How to remove legend from bottom of chart - amcharts

12.3k views Asked by At

Can you please help me out to remove the legend (of y-axis data) from the below the line-chart. This is the icon that helps to remove the corresponding line from the line-chart.

See inline imageTo remove the red-bordered section

3

There are 3 answers

3
Jatin patil On BEST ANSWER

In amcharts the legends are added manually, In your case jut remove the lines which add legends to the chart.

For e.g., The legends are added as follows,

 var legend = new AmCharts.AmLegend();
 chart.addLegend(legend);

OR

AmCharts.makeChart("chartdiv",
    {
        "legend": {
                    "useGraphSettings": true
                  },
     }

Just remove the above lines from your code.

0
ghiles ybeggazene On
  $scope.chart = AmCharts.makeChart("chartdiv", {
              "type": "gantt",
             "hideCredits":true
})
0
mihai_omega On

You can still keep your graphs settings (labels, balloons etc) but hide the legend:

AmCharts.makeChart("chart", {
    "legend": {
        "enabled": false
    },
}