vaadin / charts

Framework 8 version of Vaadin Charts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1970 bug in charts if a null entry is available in the y-axis

TatuLund opened this issue · comments

I use
Vaadin 8.9.0
Google Chrome Browser:Version 77.0.3865.90

if I load the data about a provider and if I have a null in the y-axis the X-axis begins at 1970. If no nulls are in it. All is fine.

If I add the same input(with nulls) direct with myDataSeries.add(new DataSeriesItem(...)) all works fine.

Can somebody fix this provider error bug or can tell a workaround?

Here my code

private DataProviderSeries getDataSeries(Configuration conf, DataProvider<T, ?> provider, ValueProvider<T, ? super Object> xColumn, ValueProvider<T, ? super Object> yColumn) {
XAxis xAxis = conf.getxAxis();
xAxis.setType(AxisType.DATETIME);
DataProviderSeries o = new DataProviderSeries<>(provider);
PlotOptionsLine pol = new PlotOptionsLine();
pol.setConnectNulls(false);
o.setPlotOptions(pol);
o.setX(xColumn);
o.setY(yColumn);
return o;
}

configuration.addSeries(getDataSeries(configuration, itemProvider, Bonitur::getDatum, Bonitur::getXXXX));