Skip to content

Support rotating popup label text in CMPCharts #16

@nick0226

Description

@nick0226

Hi!

Image

I'm currently using the CMPCharts library and exploring how the popup label (tooltip) is implemented.

Right now the popUpLabel parameter only returns a String:

popUpLabel = { x, y ->
"Date: $date\nAmount: $value"
}

Because of this it seems impossible to apply Compose modifiers such as rotation. In my case I need the popup label text to be rotated (for example 90°) to better fit the layout when using horizontal charts.

From what I understand, the popup label is internally rendered as text and not as a Composable, so customization options are limited.

My questions:

  1. Is there currently a way to rotate the popup label text?
  2. Is it possible to provide a custom Composable instead of a String for popUpLabel?
  3. If not, would you consider supporting something like:

popUpLabel = { x, y ->
CustomComposableLabel(...)
}

This would allow more flexible UI customization (rotation, styling, layout, etc.).

Thanks for the great library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions