Support positioning axis title above the vertical axis #1478
dmitry-stakhov
started this conversation in
Ideas
Replies: 1 comment
-
|
Thanks for the detailed write-up — we’ll look into adding first-class support for this. In the meantime, a more robust workaround than overlaying a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
When building financial charts with a Y-axis unit label (e.g. "USD", "%"), it's common to place that label above the vertical axis, directly on top of the first tick label.
Currently,
VerticalAxissupports atitle/titleComponentparameter, but the title is always drawn rotated 90 degrees and vertically centered alongside the axis. There is no option to place it horizontally at the top.Current workaround
Overlay a separate
Textcomposable on top ofCartesianChartHostwith a manually calculated negative Y offset:This is fragile because:
Proposal
Add a
titlePositionparameter toVerticalAxisthat controls where the title is placed:When
TitlePosition.Topis used, the title would be drawn horizontally (no rotation) and positioned directly above the first tick label, with the axis accounting for the title height in its top inset.Environment
Beta Was this translation helpful? Give feedback.
All reactions