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

Line is broken if items have names and there are null values in series #119

Open
vaadin-bot opened this issue May 28, 2013 · 3 comments
Open
Labels

Comments

@vaadin-bot
Copy link
Collaborator

Originally by Jonas Granvik


Line is broken and becomes a scatter line if items have name set AND there is a null value in data series.

#!java
        Date date = new Date();
        date.setDate(1);
        Series series = new DataSeries();
        series.setName("testseries");
        List<DataSeriesItem> items = new ArrayList<DataSeriesItem>();
        DataSeriesItem item = new DataSeriesItem(date, rand.nextInt());
        item.setName("buu1");
        items.add(item);
        item = new DataSeriesItem();
        date = new Date();
        date.setDate(2);
        item.setX(date);
        item.setY(rand.nextInt());
        item.setName("buu2");
        item.setY((Double)null);
        items.add(item);
        date = new Date();
        date.setDate(3);
        item = new DataSeriesItem(date, rand.nextInt());
        item.setName("buu3");
        items.add(item);
        date = new Date();
        date.setDate(4);
        item = new DataSeriesItem(date, rand.nextInt());
        item.setName("buu4");
        items.add(item);
        ((DataSeries) series).setData(items);
        conf.addSeries(series);

The following JSON is produced which shows that the y-value is totally missing (not null) in series

{
  "chart": {
    "type": "line"
  },
  "title": {
    "text": ""
  },
  "plotOptions": {
    "line": {
      "stacking": ""
    }
  },
  "series": [
    {
      "data": [
        {
          "name": "buu1",
          "y": 519935669,
          "x": 1367405310087,
          "customized": true
        },
        {
          "name": "buu2",
          "x": 1367491710088,
          "customized": true
        },
        {
          "name": "buu3",
          "y": 459002652,
          "x": 1367578110088,
          "customized": true
        },
        {
          "name": "buu4",
          "y": -1079744054,
          "x": 1367664510088,
          "customized": true
        }
      ],
      "name": "testseries",
      "visible": true
    }
  ],
  "exporting": {
    "enabled": false
  }
}

Imported from https://dev.vaadin.com/ issue #11941

@vaadin-bot
Copy link
Collaborator Author

Originally by @mstahv


Fixing this requires a bit ugly hack to code until #12038. The project that found the issue, found out that names where irrelevant for them so lowering priority. We'll re-consider quick ugly fix in maintenance release if somebody else finds this important (e.g. via pro bug fix priority).

@vaadin-bot
Copy link
Collaborator Author

Originally by @zch


This issue is present for all chart types with data series containing null values.

@vaadin-bot
Copy link
Collaborator Author

Originally by @zch


We don't have time to do #12038 for 2.0, and there's not much point in making an ugly hack right now.

@vaadin-bot vaadin-bot added the bug label Oct 17, 2016
@vaadin-bot vaadin-bot added this to the Charts 1.1.1 milestone Oct 17, 2016
@jtomass jtomass removed this from the Charts 1.1.1 milestone Oct 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants