Expected Behavior
The horizontalBar chart should plot the labels on the left with multiple scales/axes on the top and bottom (similar to the bar chart)
Current Behavior
Setting the position of the first yAxis in options to anything other than left causes unexpected behaviors with the data labels (which should be rendered on the left). The data in the second dataset is not bound to either axis.
Possible Solution
There may be an issue with how the horizontalBar is implemented – it appears the there is an issue when iterating the yAxisID property of the datasets which introduces a bug in binding to the data
Steps to Reproduce (for bugs)
JSFiddle example of bug
JSFiddle of working bar chart that should be plotted horizontally (with labels on the left)
Context
It would be nice if lengthy labels could be plotted on the left with differing bar scales that are plotted on the top and bottom showing related information where the scales may be vastly different
Environment
- Chart.js version: 2.5.0
- Browser name and version: Google Chrome Version 58.0.3029.110 (64-bit)
@ttpb2006 I think the issue here is that you’ve created 2 y axes, instead of 2 x axes. If I understand correctly, you want one set of labels on the left and then 2 horizontal axes (top & bottom). Creating 2 x axes will do this. See https://jsfiddle.net/1n78t6yy/1/