[BUG] horizontalBar chart with multiple axes not rendering correctly

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)

Author: Fantashit

1 thought on “[BUG] horizontalBar chart with multiple axes not rendering correctly

Comments are closed.