Open smarr opened 1 year ago
After some fiddling, I got almost where I want to be:
I did:
dir
on x
and y
to -1ori
to 1 on the x axisTo me it looks now like it's mostly correct. Except for the axis size of the x axis, which isn't correctly taken into account.
Hm, I think I fixed it for me.
I set the y scale to { ori: 0, dir: 0 }
which seems to give the desired result.
nice, glad you got it working.
flipped the x and y coordinates in the drawing code
you should be able to avoid this by wrapping the drawing code in uPlot.orient()
. i should probably add this to the demo. the demo code was derived from candlesticks which are always vertical, so i never bothered :)
e.g.:
Based on
I assumed that I could possibly try to flip the x and y axis for box plots (https://leeoniya.github.io/uPlot/demos/box-whisker.html). Though, a quick hack doesn't seem to do the trick.
Looking a bit more at the code of the demo, it seems like I would also need to flip the logic in the drawing routines.
Though, the interactive bits of the plots seem all very "column"-oriented. Should I be aware of any implicit assumptions that box plots are "columns"? Or should rotating/flipping axis "just work"?
At the end, I'd like reach a point where I have box plots like this:
I'd like to flip the axis mostly to make long performance reports more compact horizontally, to get loads of benchmarks on a relatively compact page. Full example: https://rebench.stefan-marr.de/TruffleSOM/compare/b953d3244f41878a1730350618a22afd595d5ba2..65141f9d66669a21cce28a5141f01b07b0f8a93f (this is currently generated with R+ggplot)
The other bit that I'd still need to figure out is how to draw the data points on top of the box, which is quite useful to me. But that's for another time.
Thanks!