Open andig opened 11 years ago
After implementation of issue #121 it is still not easily possible to create such chart:
validateSeries
stackData
graph.renderer.unstack = true
stacked series cannot have differing numbers of points: 2 vs 6; see Rickshaw.Series.fill()
Workaround I've found is to subclass the area chart renderer and use that:
Rickshaw.namespace('Rickshaw.Graph.Renderer.UnstackedArea'); Rickshaw.Graph.Renderer.UnstackedArea = Rickshaw.Class.create(Rickshaw.Graph.Renderer.Area, { name: 'unstackedarea', defaults: function($super) { return Rickshaw.extend($super(), { unstack: true, fill: false, stroke: false }); } } );
This works as unstack is already true when Rickshaw.Graph gets created.
Is there a more elegant solution?
At the moment, this is a good workaround. We've run into this from time to time too. We'll look into moving that validation to happen around the stacking rather than from within the graph constructor.
After implementation of issue #121 it is still not easily possible to create such chart:
validateSeries
andstackData
are being called beforegraph.renderer.unstack = true
can be setstacked series cannot have differing numbers of points: 2 vs 6; see Rickshaw.Series.fill()
exceptionWorkaround I've found is to subclass the area chart renderer and use that:
This works as unstack is already true when Rickshaw.Graph gets created.
Is there a more elegant solution?