-
-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Is your feature request related to a problem? Please describe.
My data often demands long categorical labels on the Y axis that I can't shorten, and I'd like to be able to wrap these labels onto multiple lines.
Describe the solution you'd like
Ideally, I'd like to be able to set a width or character limit that would automatically wrap the labels and offset their vertical position appropriately.
Alternatively, I guess some kind of method to inject a {#snippet} into the SVG tag for the tick labels in BaseAxisY.svelte
could make it possible to achieve a reasonably elegant workaround (?!)
Describe alternatives you've considered
I think the realistic alternatives would be:
- A custom fork of the
BaseAxisY.svelte
component. - A hacky workaround.
- An alternative chart library.
Additional context
Re the hacky workaround option, I've played with the idea of overlaying multiple Y-axes in this Svelte REPL (see result below). It really doesn't feel like an elegant solution, and currently only works for one or two-line labels.