Home Forums Chart Support Verical line interval issue

Verical line interval issue

Viewing 2 posts - 1 through 2 (of 2 total)
  • #28429

    Hi ,
    Here need to display only two dates ,but in the below example showing multiple dates in y-axis.Can you please look in the below issue and do needful.
    chart = new CanvasJS.Chart(“chartContainer”,
    {
    title: {
    text: “PAS Process TAT”,
    fontColor: “#2C4B5D”
    },
    axisX: {
    valueFormatString: “MM/DD/YYYY”,
    labelFontWeight: “bold”
    },

    toolTip: {
    shared: true
    },
    legend: {
    horizontalAlign: “center”,
    verticalAlign: “bottom”,
    fontWeight: “bold”,
    fontSize: 23,
    fontColor: “#2C4B5D”

    },
    data: [
    {
    type: “stackedBar”,
    name: “<=4Hrs”,
    showInLegend: true,
    color: “#77a033”, /*”#4978B1″*/
    indexLabelFontSize: 15,
    indexLabelFontColor: “black”,
    indexLabelFontWeight: “bold”,
    dataPoints: [
    { x: new Date(2020, 01, 1), y: 71 },
    { x: new Date(2020, 02, 1), y: 55}

    ]
    }

    ]
    });

    chart.render();

    Thanks,
    Sravanthi

    #28439

    @sravanthi-b

    Axis labels and the interval at which they are shown are auto-calculated based on the chart size and the range of the axis. In your scenarios where you want to display dates aligned to the corresponding dataPoints, you can use label instead of x-values as shown in this JSFiddle.


    Shashi Ranjan
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.