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.
- Yonatan D asked 9 years ago
- last edited 9 years ago
- You must login to post comments
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
- Andrew Burnett-Thompson answered 9 years ago
-
Is there a way to do this from the code behind, in a mvvm fashion?
- You must login to post comments
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
- Ari Sagiv answered 8 years ago
- last edited 8 years ago
-
Thanks! I’d vote this up, but our forum up-vote feature is broken. Fix coming soon!
-
No problem!
- You must login to post comments
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
- Martin Mohr answered 4 years ago
-
The property “BaseRenderableSeriesViewModel.IncludeRolloverModifier ” can be used, which solved a similar problem for me.
- You must login to post comments
Please login first to submit.