Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Horizontal bar chart in combination with a line chart #4047

Closed
kresten8 opened this issue Mar 20, 2017 · 6 comments · Fixed by #7514
Closed

[FEATURE] Horizontal bar chart in combination with a line chart #4047

kresten8 opened this issue Mar 20, 2017 · 6 comments · Fixed by #7514

Comments

@kresten8
Copy link

When I create an horizontal bar chart and set one of the datasets to 'line' it doesn't show. I suspect the axis for the line chart is not changed with the parent horizontalBar chart.
I think the expected behaviour is to let the main chart type be leading, in this case the horizontal bar chart, so that the datasets that are provided don't need to be changed.

This example would work with a normal bar-chart, but not with an horizontal bar-chart:
chartData : { labels: [ 'apple', 'orange', 'banana', 'coconut' ], datasets: [ { title: 'Taste', data: [ 1,4,2,3 ] }, { title: 'Throwability', data: [ 5,4,2,3 ], type: 'line' } }

@etimberg
Copy link
Member

@kresten8 I think something happens with the axes being reversed and so the line tries to plot the data points vs the Y axis instead of the X axis

@JewelsJLF
Copy link
Contributor

Any updates on this one? I am needing to do this as well. I'm building a gantt type chart and using horizontalBar type to do that. I was hoping I could overlay a line series or scatter plot to display milestone markers.

@a10k
Copy link

a10k commented Feb 4, 2019

Apparently, this is not possible with chartjs as of now for anyone else looking for this. Horizontal bar charts can't be used with any other charts.

@ullalaaron
Copy link

Guys this would be very useful, according to this it looks like it's possible but I have not been able to reproduce on my end. If anyone knows a workaround, I would love to plot dots.

@hoai-nguyen
Copy link

Any update on this please. -.- I saw a lot of questions asking for this but it's still Open since 2017.

@LincolnBorges
Copy link

This feature would be much appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants