shutterstock / rickshaw

JavaScript toolkit for creating interactive real-time graphs
https://shutterstock.github.io/rickshaw
MIT License
6.53k stars 939 forks source link

slider.preview uses graph.config which ends up having the wrong value for 'unstack' #586

Open pstanton opened 6 years ago

pstanton commented 6 years ago

I have a graph, with 1 set of stacked series (data point each 5 mins) and 1 set of unstacked lines to overlay (data point each 30 mins).

this renders fine with a normal graph with renderer:"multi"

however if i then use a "Rickshaw.Graph.RangeSlider.Preview" I get errors stating that the series must have equal length.

I deduced it down to the fact that the slider uses "parent.config" which has the wrong value for "stack"/"unstack" at the time of render.

I've found that changing the value of stack in graph.config after the graph is constructed solves the issue.

ie graph = new Rickshaw.Graph({renderer:"multi", series:series}); graph.config.stack = false;