Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TatuLund opened this issue Oct 27, 2019 · 1 comment
Open

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

TatuLund opened this issue Oct 27, 2019 · 1 comment

Comments

@TatuLund
Copy link
Contributor

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));

@TatuLund
Copy link
Contributor Author

Copied from vaadin/framework#11736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant