Skip to content

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

@TatuLund

Description

@TatuLund

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions