Multiple Y axis in single chart?

I have two data sets and I want to show them in the same chart.

Both data sets are time based (x axis) and with same time range. They have different units of measure and scaling (y axis).

Is it possible to show both data sets in the same chart, but with two different y axis definitions?

I have tried to overlay two independent charts but then the two charts are not aligned as I configure one with Y axis to the left and the other with Y axis to the right.

Any ideas how to make this happen?

Replies

This will give you multiple set of basic axis that you can then customise, to show different scales for your sets of data. You may need to scale your data yourself so that the scales make sense etc!

Chart{
    ...
}
.chartXAxis {
    AxisMarks(position: .top)
    AxisMarks(position: .bottom)
}
.chartYAxis {
    AxisMarks(position: .leading)
    AxisMarks(position: .trailing)
}