Exclude Series from Shared Tooltip

1 Answer 52 Views
Charts Tooltip
Nathaniel
Top achievements
Rank 1
Nathaniel asked on 03 Nov 2021, 02:31 PM

I have a chart with multiple series with a shared tooltip. 

I am using a selection navigator on the bottom of the chart. I want to exclude that series from the shared tooltip. I set tooltip={{visible: false}} but that does not work. Wondering if there is something I am missing. Seems like it should be possible to exclude a series from a shared tooltip.

Thanks,

Nate

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 04 Nov 2021, 08:16 AM

Hello, Nathaniel,

This could be done with a custom render for the Tooltip where the developer can render anything that is needed in the Tooltip:

https://stackblitz.com/edit/react-tr1bzd?file=app/main.jsx

Regards,
Stefan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Nathaniel
Top achievements
Rank 1
commented on 04 Nov 2021, 03:27 PM

Hi Stefan,

That sort of answers the issue I am having. Please look at the screenshot attached. I have one main line on the chart and then I have a selector at the bottom. In the code posted below, the second ChartSeriesItem is what is used for the navigator pane. I want to know if there is a way when I hover over the main line, that the Shared tooltip does not pick up that second ChartSeriesItem? Also when I hover over the Navigator I get a tooltip rendered even though i set tooltip={{visible: false}}.

Hope that makes a little more sense. 

 

<ChartSeries>
<ChartSeriesItem
type='line'
width={Constants.lineChartLineWidth}
color={Constants.lineChartLineColor}
markers={{ visible: false }}
data={data}
/>
<ChartSeriesItem
type="area"
style="smooth"
data={paneData}
axis="valueNavigatorAxis"
categoryAxis="navigatorAxis"
markers={{visible: false}}
tooltip={{visible: false}}
/>
</ChartSeries>
Stefan
Telerik team
commented on 08 Nov 2021, 06:03 AM

Hello, Nathaniel,

If the series are part of the same Chart they will be visible in the shared Tooltip and the shared Tooltip will be shown of each one of them.

One option can be to not use the shared Tooltip and only use a standard Tooltip for the top series. Then use the content prop of the tooltip if you wish to show more data in it. This will show the Tooltip only when the top series is hover and will allow showing only specific information.

If the issue still occurs, please share a fully runnable example with it and I will be happy to take a look and modify it if needed.

Tags
Charts Tooltip
Asked by
Nathaniel
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or