score:1

The way you posted is exactly how you add more than one axis.

    const yScaleA = d3.scaleLinear().domain([0,1]).range([10,190])
    const yScaleB = d3.scaleLinear().domain([10,100]).range([10,190])
    
    const yAxisA = d3.axisLeft(yScaleA)
    const yAxisB = d3.axisLeft(yScaleB)
    
    const svg = d3.select('svg')
    
    svg.append('g').attr('transform','translate(100,0)').call(yAxisA)
    svg.append('g').attr('transform','translate(50,0)').call(yAxisB)

Here is a minimal working example to demonstrate.

If you didn't achieve this result, then there is a bug somewhere else in the application.


Related Query