Vaadin charts - add series dynamically

What is the proper way to add series dynamically?

  1. I want to add new visible series.
    I already set up my chartConfiguration object (type Configuration) and chart object (Chart chart), I already have several series on the chart (I have visible and hidden charts). I want to add one dynamically. I do the following:

ContainerDataSeries chartContainer = new ContainerDataSeries(
dataContainer); // dataContainer - Container with data
PlotOptionsLine plotOptions = new PlotOptionsLine();
// set some values like plotOptions.setColor(…)



It seems that nothing happens until I do chart.drawChart(). The problem with calling chart.drawChart() is that all hidden series (I make them hidden manually with setVisible(false, true)) are shown after the call chart.drawChart(). What is the proper way to add new series dynamically?

  1. How to add new hidden series dynamically?
    The only way I know - manually call setVisible(false, true), but it does nothing right after chart.drawChart() call, and do nothing right before chart.drawChart(). It looks like I must do something to refresh the whole chart, but I don’t know the proper way. Any suggestions?

I have exactly the same problem. Looking at vaadin charts code I can see that the “change visibility” events is only fired if the configuration is different than null and the “visibility states” are different before and after calling setVisible method.
Anyone from vaadin could help us on this, please ?

Is chart`s y axis values align with x axis correctly when set x axis as