Search code examples
jquerylinechartamcharts

How to remove legend from bottom of chart - amcharts


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


Solution

  • 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.