How to create horizontal stacked bar charts (sort of Gantt chart) multiple groups with line charts for each group in Chart.js? #11887
Unanswered
tukusejssirs
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First asked at StackOverflow
Horizontal stacked bar charts with multiple groups
As for the horizontal stacked bar charts with multiple groups, I like this solution. It seems to work with
[email protected]
without any issues, so I’d like to use that version.It looks like this (note the colours a generated, therefore every time one loads the chart, they are different):
Problem description
However, I am unable to modify it so that for each group I can add one or more line charts where the
x
axis is a timeline (just like it is for the bar charts) andy
axis is a number in a unit (e.g. percentage). I want the height of each (sub-) chart (be it bar or line chart) to be same, therefore they
axis of a line chart should not have the same height as the whole chart (composed of all bar and line charts).Bonus points
It would be awesome if I could define some thresholds to colour the either the line in line charts or some gradient below it, like when the value is:
green
;yellow
;red
.Nice to have
Show a vertical date line on hover. ;)
Beta Was this translation helpful? Give feedback.
All reactions