Zaid-Ajaj / Feliz

A fresh retake of the React API in Fable and a collection of high-quality components to build React applications in F#, optimized for happiness
https://zaid-ajaj.github.io/Feliz/
MIT License
534 stars 78 forks source link

Feliz.Recharts support for BiaxialLineChart ? #547

Closed Sprootch closed 1 year ago

Sprootch commented 1 year ago

I would like to have a biaxial line chart (see here) but it doesn't seem to work. When I setup two yAxis like this:

          Recharts.yAxis [ yAxis.name "left" ; ]
          Recharts.yAxis [ yAxis.name "right" ; yAxis.orientation.right ]
          Recharts.line [
                     line.yAxisId "left"
                     ....
         ]
         Recharts.line [
                     line.yAxisId "right"
                     ....
        ]

I've got this error from Recharts : can't access property "scale", yAxis is undefined

Sprootch commented 1 year ago

Damn, I just found that it's in the documentation : https://zaid-ajaj.github.io/Feliz/#/Recharts/LineCharts/BiaxialLineChart How come it doesn't work in my case ?

Sprootch commented 1 year ago

I'm stupid. Just use yAxis.yAxisId instead of yAxis.name and it will work.

Recharts.yAxis [ yAxis.yAxisId "left" ; ] Recharts.yAxis [ yAxis.yAxisId"right" ; yAxis.orientation.right ]