datavisyn/chartjs-scale-hierarchical

For stacked bar ?

kocil opened this issue · 2 comments

kocil commented

Hello,
This is really great.
I came here from the chartjs/Chart.js#4946.
So the remaining issue, how to use it for a stacked bar chart ?

Thank you very much.

just like a regular stacked bar chart. Define two dataset-trees and specify stacked: true. Since the hierarchical scale is based on the regular categorical one, it works out of the box.

see
https://codepen.io/sgratzl/pen/WKNrOJ?editors=0010

image

kocil commented

Perfect 👍

Thank you very much