Chart js name feature
bariew opened this issue · 4 comments
bariew commented
Hi and thank you for your widget!
I would like to call the rendered chart javascript object to change its data dynamically - so i need its javascript name. Could you add $name attribute to the witdget?
So in Widget:96 it would look like
$js = $this->getChartName() . " = AmCharts.makeChart('{$this->chartDivId}', {$chartConfiguration});";
bariew commented
Thank you! But is the default chartId valid javascript variable name ('chart-' . $this->getId())? I'm afraid '-' is not allowed?
speixoto commented
You are right. :) Changed to chart_
bariew commented
Thank you very much!