Hi, I tried use Chart on Dialog but I got javascript errors. Same other place on the ui view works without any problem. What is the right way on dialog?
protected void openDiagram(LampWrapper lampWrapper, String... inputs) {
Dialog dialog = new Dialog();
ApexCharts chart = ChartLayout.createHistoryApexChart();
chart.setWidthFull();
Futures futures = new Futures();
futures.add(service.historyAsync(System.currentTimeMillis() - TimeUnit.DAYS.toMillis(14), System.currentTimeMillis(), inputs, lampWrapper.getTarget()));
futures.with(new HistoryWrapper(), targetHistory ->
UIUtils.access(getUI(), () -> {
refreshChart(chart, targetHistory, inputs);
})
).execute();
dialog.setHeight(“600px”);
dialog.setWidth(“800px”);
dialog.add(chart);
dialog.open();
}