Open Ildar1313 opened 2 years ago
Hello. The chart is not updated.
public ChartjsData getChartData() { CategoryChartjsData chartData = new CategoryChartjsData(); chartData.add("In", new Random().nextInt(10000)); chartData.add("Out", new Random().nextInt(10000)); return chartData; }
ZUL: <chartjs type="pie" data="@load(vm.chartData)"/>
<chartjs type="pie" data="@load(vm.chartData)"/>
When I click on the button, the chart should be updated: @Command @NotifyChange({"chartData"}) public void updateChart(){ }
@Command @NotifyChange({"chartData"}) public void updateChart(){ }
But an error occurs: "(illegal character U+0040 (SyntaxError))"
Request:
Response:
{"rs":[["setAttr",[{$u:'eT7Qh5'},"data",{"labels":[],"datasets":[{"label":"Values","colorPalette":tools.dynamia.zk.addons.chartjs.ChartjsColorPalette@1eb307c2,"data":null}]}]]],"rid":1}
Are you planning to fix this bug? I found a workaround: I delete the entire chart and recreate it with updated data.
Hello. The chart is not updated.
public ChartjsData getChartData() { CategoryChartjsData chartData = new CategoryChartjsData(); chartData.add("In", new Random().nextInt(10000)); chartData.add("Out", new Random().nextInt(10000)); return chartData; }
ZUL:
<chartjs type="pie" data="@load(vm.chartData)"/>
When I click on the button, the chart should be updated:
@Command @NotifyChange({"chartData"}) public void updateChart(){ }
But an error occurs: "(illegal character U+0040 (SyntaxError))"
Request:
Response:
{"rs":[["setAttr",[{$u:'eT7Qh5'},"data",{"labels":[],"datasets":[{"label":"Values","colorPalette":tools.dynamia.zk.addons.chartjs.ChartjsColorPalette@1eb307c2,"data":null}]}]]],"rid":1}