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