Home Forums Chart Support LegendText not displaying in StackedBar Chart

LegendText not displaying in StackedBar Chart

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

    window.onload = function () {
    var chart = new CanvasJS.Chart(“chartContainer”,
    {
    title:{
    text: “Doughnut Chart with Legend”
    },
    legend: {
    horizontalAlign: “right”,
    verticalAlign: “center”
    },
    data: [
    {
    showInLegend: true,
    type: “stackedBar”,
    showInLegend: true,
    dataPoints: [
    {x:1, y:716,label: “InHouseVol”, indexLabel: “716;2.8”, legendText: “InHouseVol” },
    {x:2, y:100,label: “1”, indexLabel: “100;50”, legendText: “Not Met” },
    {x:3, y:300,label: “2”, indexLabel: “300;1.2”, legendText: “Met”},
    {x:2, y:250,label: “1”, indexLabel: “250;30”, legendText: “Met” },

    ]
    }
    ]
    });

    chart.render();
    }

    #27294

    @sravanthi-b,

    It seems to be working fine. Can you kindly share JSFiddle reproducing the issue you are facing so that we can look into it and help you out?

    P.S.: Legend will be shown for every series incase of multi-series column, stacked-column, line, area, etc.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.