Skip to content

Ability to wrap Y-axis tick labels onto multiple lines #71

@bothness

Description

@bothness

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:

  1. A custom fork of the BaseAxisY.svelte component.
  2. A hacky workaround.
  3. 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.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy