You must be logged in to post your query.
Home › Forums › Chart Support › Verical line interval issue
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
@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
You must be logged in to reply to this topic. Login/Register