SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

Answered
1
0

Hi,

I’m using the TooltipModifier to show a tooltip for a series.

The tooltip is defined globally in the ‘ChartModifier’ section. However I have multiple series, and I would only like to show the tooltip for a specific series, and not the others.

How can I achieve this?

Thanks.

  • You must to post comments
Best Answer
0
0

Hi there,

You can use the TooltipModifier.IncludeSeries attached property:

<s:SciChartSurface>
    <s:SciChartSurface.RenderableSeries>
        <FastLineRenderableSeries TooltipModifier.IncludeSeries="True"/>
        <FastLineRenderableSeries TooltipModifier.IncludeSeries="False"/>
    </s:SciChartSurface.RenderableSeries>
</s:SciChartSurface>

The default value is true. Setting it to false excludes a particular series from the TooltipModifier.

Hope this helps,

Andrew

  • Kohins
    Is there a way to do this from the code behind, in a mvvm fashion?
  • You must to post comments
0
0

Going to respond to Kohins’ Question:

Is there a way to do this from the code behind, in a mvvm fashion?

Yes, you can. You can access the data from the codebehind if you’re using MVVM by getting the renderableSeries from your chart named “plot”.

var seriesSource = plot.RenderableSeries;
foreach (var data in seriesSource)
{
     // set criteria for removal of cursor modifier (i.e. if series type == something)
     CursorModifier.SetIncludeSeries(data as DependencyObject, false);
}

Hope this helps.

Edit – Make sure you change the modifier class to the type of rollover modifier you’re planning on using:

Cursor Modifier — CursorModifier.SetIncludeSeries
Rollover Modifier — RolloverModifier.SetIncludeSeries

— Ari

  • Andrew
    Thanks! I’d vote this up, but our forum up-vote feature is broken. Fix coming soon!
  • Ari Sagiv
    No problem!
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.