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

Multi-line chart with no data in first set of series breaks rendering #347

Closed
dprotaso opened this issue Feb 4, 2015 · 1 comment
Closed
Assignees
Milestone

Comments

@dprotaso
Copy link

dprotaso commented Feb 4, 2015

I've noticed the library makes a few assumptions about data format based on the first entry in the series

ie. https://github.com/mozilla/metrics-graphics/blob/master/src/js/misc/process.js#L13

In my case an API is returning the following data:
[
[],
[ {...}, {...}, ..],
[ {...}, {...}, ..]
]

This breaks rendering since it thinks my data is an unnested array of arrays and hence modifies the format.

Any thoughts on how to get around this? I'm aware I could remove the empty array prior - but one criteria I have is to always show the legends in a specific order even if there is no data present.

@hamilton hamilton added this to the v2.2 milestone Feb 5, 2015
@almossawi
Copy link
Contributor

Are you able to move that first element to, say, the end, to mitigate the issue?

@hamilton I'm guessing this is something that we'll want to think about? I've moved it to v2.3 since I suspect we won't have time to work on it before Monday.

@almossawi almossawi modified the milestones: v2.3, v2.2 Feb 13, 2015
@almossawi almossawi modified the milestones: v2.4, v2.3 Mar 30, 2015
hamilton added a commit that referenced this issue Apr 7, 2015
hamilton added a commit that referenced this issue Apr 7, 2015
almossawi added a commit that referenced this issue Apr 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants