Graphing multiple datasets on parallel axes
I'm trying to graph two different kinds of dataset as lines on one chart. Both share an X-axis (week of the year) but have different Y-axes; the first has a categorical Y-axis (stage of development) and the second has a linear Y-axis (Brix value, a number from 0-30.)
The first kind of dataset shows up, the second doesn't. I can see its label on top of the chart, but the data is not graphed.
Here's how the first kind of dataset is built:
{
label: title,
labels: data,
fill: false,
lineTension: 0.1,
borderColor: colorArray()[counter],
borderCapStyle: 'butt',
borderJoinStyle: 'miter',
pointBorderColor: 'rgba(75,192,192,1)',
pointBackgroundColor: '#fff',
pointBorderWidth: 1,
pointHoverRadius: 6,
pointHoverBackgroundColor: 'rgba(75,192,192,1)',
pointHoverBorderColor: 'rgba(220,220,220,1)',
pointHoverBorderWidth: 3,
pointRadius: 1,
pointHitRadius: 1,
showLine: true,
steppedLine: true,
spanGaps: true,
data: data,
year: dataYear,
measurement: 'state'
};
Here's how the second kind is built:
{
label: title,
labels: brixLabelArray,
fill: false,
lineTension: 0.1,
borderColor: colorArray()[counter],
borderCapStyle: 'butt',
borderJoinStyle: 'miter',
pointBorderColor: 'rgba(75,192,192,1)',
pointBackgroundColor: '#fff',
pointBorderWidth: 1,
pointHoverRadius: 1,
pointHoverBackgroundColor: 'rgba(75,192,192,1)',
pointHoverBorderColor: 'rgba(220,220,220,1)',
pointHoverBorderWidth: 6,
pointRadius: 3,
pointHitRadius: 1,
showLine: true,
steppedLine: false,
spanGaps: true,
data: data,
year: dataYear,
measurement: 'Brix'
}
Here's how I'm building the options object:
{
legend: {
display: true
},
scales: {
xAxes: [
{
scaleLabel: {
display: true,
labelString: 'Weeks'
},
ticks: {
autoSkip: true,
autoSkipPadding: 20
}
}
],
yAxes: [
{
type: 'category',
labels: this.state.eventLabelArray
},
{
type: 'linear',
labels: this.state.brixLabelArray
}
]
}
};
And here is how I put it all together:
const data = {
labels: this.state.eventWeekArray,
datasets: datasets
};
<Line data={data} options={options} />
And here is what it looks like. You can see the Brix data is showing up as a label, but not being charted:

Any fix for this issue ?
Closing for now. Please supply a sandbox or code example with the latest versions of both libraries. If the problem persists, feel free to open a new issue.