elm-charts icon indicating copy to clipboard operation
elm-charts copied to clipboard

merge `ChartModels` to build up complex charts

Open neilvyas opened this issue 8 years ago • 0 comments

Let's say that I want to have one vBar chart with the bars having different colors, say, so I can do something like this (but flipped horizontally):

image

It seems the most natural to make two calls to vBar, call updateStyles "chart-elements" on each one to set the colors for the bars or line, and then concat the models before calling toHtml. As it stands now, there's no compositional behavior implemented, and it looks like you can't do it without re-writing ChartModel because of how styles is stored, or introducing a higher-level model that can handle composition.

neilvyas avatar Oct 10 '16 04:10 neilvyas