Line chart stretching data sets
Opened this issue · 1 comments
bengreville commented
More of a question than anything...
How do you stop two lines from stretching to be the same length if one contains less data than the other.
For instance my data is:
[[17, 28, 49, 59, 62], [24, 40, 52, 63]]
which produces this:
What I need is the orange line to end at 4 on the x axis.
Any help on this is much appreciated, thanks in advance.
bengreville commented
Issue resolved: needed to do a bit of data manipulation before generating the graph. As a reference for anyone with this problem in the future, add nulls to the data sets you want shortened until it equals the largest data set in your array. For example:
[[17, 28, 49, 59, 62], [24, 40, 52, 63, nil]]
OR
[[17, 28, 49, 59, 62], [24, 40, 52, 63, nil], [15, 64, nil, nil, nil]]