leeoniya / uPlot

📈 A small, fast chart for time series, lines, areas, ohlc & bars
MIT License
8.48k stars 370 forks source link

Rotating ticks on axes other than bottom(2) #926

Open Elukej opened 2 months ago

Elukej commented 2 months ago

Hello! Im using your library very successfully for a bussiness project! It's a great library! Kudos for that from me. Now to the question.

I got a request to rotate the plot I made with all of its annotations for 90 degrees, and it almost works by rotating the u-wrap element, except the ticks of axes 0,1,3 remain in the wrong rotation. I used the functionality to rotate the ticks on axis 2 and it works perfectly. My question is, is this possible with the current functionalities of the library, and if not, does it sound useful to you for the library that I try to implement this feature to be possible for the remaining three axes? I know it would be the cleanest solution for my problem, and I would very much like to contribute to the library that helped me tremendously on the work!

P.S. I read your issue #180 about rotation of labels, but It didnt answer my question so I had to ask like this. Kind regards!

leeoniya commented 2 months ago

the way to rotate a plot is to specify scale and axis direction and orientation: https://leeoniya.github.io/uPlot/demos/scales-dir-ori.html

it's unlikely to work properly another way.