Stacked bar chart
Awesome lib, thanks for coding! Any chance for a stacked bar chart?
Will be looking to add different chart types in the future. I'll aim to extract different chart types into a packager app, so you can pick and choose what charts you want to include.
This great, nice work! I'm also looking for stacked bar/line chart, let me know if I can help ;)
That would be great. Would love to switch to this from Highcharts but need stacked bars and stacked area charts. Great work so far!
+1 on both stacked bar charts and stacked line area plots
I threw something together for the stacked bar chart overnight. It's basically a hacked version of the original bar chart, so it runs off the same data, just puts one on top of the other rather than next to. It seems to work just fine with any positive data, I've tested up to 6 data sets, but negative data sets are not yet supported. I have submitted a pull request.

:+1:
#37 is @Verran42's pr
any plans for tooltip integration for this?
Bump, was just about to implement this myself.
Maybe we can think about the packager after, and include this cool feature first !?
An implementation on top of the existing bar chart (setting the option stacked: true): #168
Another cool variation would be percent stacked bar charts where the bars all the same height (100%) but the sections vary according to proportion of the components.
It looks like this solution needs an extreme amount of work. Is is an example I just ran with this version of chart.js, and then the plot using the same data with google analytics.

The biggest problem you'll see is the stacked chart.js is using a minimum box size for every data value, and then summing those values. So in my 60% column where all the values are too small to even be visible, it gets total up to a over 2,000,000. The actual total for that column is 47.25. This bug should be fairly trivial to fix. What requires a lot of work is finding a way to format the charts js version to look nearly as pretty as the google version... I don't even see an option to make the bar widths wider, or at least appear directly above the labels...
Adding a legend off to the side is also extra manual work... I think it is possible to reform the numbers to have comma thousand separators in chart.js, but it doesn't happen by default.
@docbillnet Do you have the dataset? Might it work with https://github.com/nnnick/Chart.js/pull/168 ?
#168 has the same basic bug. It is calculating a yOffset by adding bar heights, which is a rounded up value with offsets added for a minimum size. So there is both accumulation of the minimum values and cumulative round-off error from each value. Preferably what it should do instead is keep track of total data value, and then calculate the yoffset based that... That way there would be no cumulative effect.
That said, it looks like #168 might get the bar widths correct, I will try it and see if it is a step in the right direction.
Looks like I was wrong. #168 probably has cumulative round-off error (I'll have to look more carefully), but it does not accumulate a minimum size. So if I could figure out how to stretch the width of the bars to fill up the space, this would not be half bad.

I think I intentionally accounted for the minimum-size accumulation error. I'm not sure why the bars get narrow, but I'll give it a look.
Setting barStrokeWidth to 0 makes the bars much wider. I'm not sure why data.datasets.length would be included at all in the barWidth calculation when stacked. That is probably a bug. Looking closer, it looks like yOffset is not a rounded value, so there should not be an accumulated error like I was expecting.
Hi! You are right, that was a bug. I removed that configuration and fixed an horizontal misalignment. I also made it so that stacked charts would start at zero.
Could you check again, please?
The fun with building from live data (from a test system), the data used has changed. So I'll show both again. As you can see chart.js is looking much better than before. :)

