Home › Forums › Chart Support › dynamic Year-Month on Axis value-bar chart › Reply To: dynamic Year-Month on Axis value-bar chart
var chart = new CanvasJS.Chart(“chartContainer”, { title:{ text: “Basic Column Chart” }, axisY: { title: “Patient Treatment Duration”, //intervalType: “month”, labelFormatter: function (e) { return CanvasJS.formatDate( e.value, “MMM-YYYY”); }, includeZero: true, }, data: [{ type: “bar”, indexLabel: “{y}”, indexLabelPlacement: “inside”, indexLabelFontWeight: “bolder”, indexLabelFontColor: “white”, dataPoints: [ {label:”A”,y: 71 }, {label:”b”,y: 55}, {label:”c”,y: 50 }, {label:”d”,y: 65 }, {label:”e”,y: 95 } ] }] });
chart.render();