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

时间:2022-02-15 14:59:56

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.

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

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

请参见内嵌图像

2 个解决方案

#1


2  

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

在amcharts中,传说是手动添加的,在你的情况下,jut删除了向图表添加图例的行。

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.

只需从代码中删除上面的行。

#2


2  

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

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

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

#1


2  

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

在amcharts中,传说是手动添加的,在你的情况下,jut删除了向图表添加图例的行。

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.

只需从代码中删除上面的行。

#2


2  

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

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

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