Pre loader

Tooltip for specific series

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

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

Hi Andrew,

is there a working MVVM example where the SetIncludeSeries is used. I failed implementing it for a LegendModifier which is part of a ModifierGroup which is bound to the ViewModel.

Regards
Martin

  • Jianping Cai
    The property “BaseRenderableSeriesViewModel.IncludeRolloverModifier ” can be used, which solved a similar problem for me.
  • 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

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies