gravity-ui/chartkit

Transparent tooltip legend colors with transparent area

Closed this issue · 4 comments

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

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

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;

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

Everything works, thanks!