我做了这样的图。
stockPanel = new AmCharts.StockPanel(AmCharts.themes.dark);
stockPanel.title = "Old Title”;
.
.
.
chart = new AmCharts.AmStockChart(AmCharts.themes.dark);
chart.id = "main chart";
chart.panels = [stockPanel];
然后我想动态更改图元素,所以我测试了这段代码。
(按下按钮后调用这些代码)
console.log(stockPanel.title); // show 'Old Title'
stockPanel.title = "NewTitle"; //
console.log(stockPanel.title);// show 'New Title'
console.log(chart.id); // show 'main chart'
chart.validateData(); // seems not to work.
图表没有变化。
我还有什么行动吗?