[FEATURE] Allow two series to be on different axes, but have the same scale

Expected Behavior

Allow two series to be on different axes, but have the same scale.

Current Behavior

Scales are auto-computed and are likely different, depending on the data.

Possible Solution

Allow a setting to force a series scale to match the scale of another series.

Context

Consider a stacked bar chart overlayed with an unstacked line chart. The bar chart needs to be stacked while the line series does not. An example is a production facility producing multiple parts where each part is represented by a stacked bar. The facility capacity is represented by an unstacked line (or a stacked line, but stacked separately from the bars). Here we need two y-axes, but we want the same exact scale so that we can display the production quantities vs the production capacity on the same scale.

Author: Fantashit

1 thought on “[FEATURE] Allow two series to be on different axes, but have the same scale

  1. @etimberg Yeah, I already have a workaround where I change the ticks.min and ticks.max via the chart options. I just didn’t want to have to compute it when Chart.js already does. I thought it would be nice to have an option that forces them to have the same scales.

    Another user did point out to me that with the new stack groupings, I can simply group all my bars together and not group the lines and put them on the same axis. This worked for me for my current needs.

    Might still be nice to be able to force multiple axes to have the same scale, but this works for now.

Comments are closed.