下面是我爲Highchart編寫的在特定條件下啓用/禁用Legend的腳本。但它不起作用。Highcharts Legend'enabled'function does not working
legend: {
layout: 'horizontal',
itemStyle: { color: '#333333', cursor: 'none', fontSize: '10px', fontWeight: 'normal' },
labelFormatter: function() {
return this.name;
},
enabled: function() {
if (ChartType == "column") {
return true;
} else {
return false;
}
}
},
似乎函數根本就沒有調用。如果我提到'啓用:真',它工作得很好..請幫助。
Thnq。回覆/評論@VõMinh Phong。修復問題 –
@SandeepMogaveer,他們都是對的,由你決定 – FieryCat