如何从图表底部删除图例 - amcharts

How to remove legend from bottom of chart - amcharts

你能帮我从折线图下方删除图例(y 轴数据)吗?这是帮助从折线图中删除相应行的图标。

查看内联图片

在 amcharts 中,图例是手动添加的,在您的情况下,只需删除将图例添加到图表的线条。

例如, 图例添加如下,

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

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

只需从您的代码中删除以上几行即可。

您仍然可以保留图表设置(标签、气球等)但隐藏图例:

AmCharts.makeChart("chart", {
    "legend": {
        "enabled": false
    },
}
  $scope.chart = AmCharts.makeChart("chartdiv", {
              "type": "gantt",
             "hideCredits":true
})