Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparent tooltip legend colors with transparent area #439

Closed
artemmufazalov opened this issue Feb 29, 2024 · 4 comments
Closed

Transparent tooltip legend colors with transparent area #439

artemmufazalov opened this issue Feb 29, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request yagr

Comments

@artemmufazalov
Copy link
Contributor

In our service we want to add grafana-style charts, with area type, bright and solid line, but semi-transparent background.

We use yagr plugin.

Area color is used in tooltip, so if we make area transparent, color in tooltip becomes transparent as well.

Example 1:
Screen Shot 2024-02-29 at 19 22 07

Example 2:
Screen Shot 2024-02-29 at 19 21 11

@korvin89
Copy link
Collaborator

@zefirka Hey! Is it possible to get access to the lineColor property in TooltipRenderOptions?

@korvin89 korvin89 added the yagr label Feb 29, 2024
@zefirka
Copy link
Contributor

zefirka commented Feb 29, 2024

It's possible having TooltipRow item in TooltipRenderOptions['scales'][string]['rows'] to use id property to get to series config:

const lineColor = tooltipRenderOptions.yagr.getSeriesById(item.id)?.lineColor;

@korvin89
Copy link
Collaborator

@artemmufazalov Hey! I've added a new property legendColorKey in versions 4.23.0 and 5.2.0. You can check usage example here.

@artemmufazalov
Copy link
Contributor Author

Everything works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request yagr
Projects
None yet
Development

No branches or pull requests

3 participants