Forum Replies Created by rajuweb

Viewing 1 post (of 1 total)
  • in reply to: dynamic Year-Month on Axis value-bar chart #39459

    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();

Viewing 1 post (of 1 total)