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

Answered
1
0

How can I synchronise two or more Rollover Modifiers from different charts? If I move the mouse I would like to see a Rollover Modifier also on other charts.

  • You must to post comments
Best Answer
1
0

Hello Stephan,

Thanks for your query! This is possible by using an attached property called the MouseManager. This is used in the SciTrader demo on the examples suite.

In the code-behind of SciTraderView.xaml you will see something like this:

<s:SciChartSurface x:Name="chart0">
   ... 
   <s:SciChartSurface.ChartModifier>
       <s:RolloverModifier 
           s:MouseManager.MouseEventGroup="MySharedMouseGroup"/>
   </s:SciChartSurface.ChartModifier>
</s:SciChartSurface>

<s:SciChartSurface x:Name="chart1">
   ... 
   <s:SciChartSurface.ChartModifier>
       <s:RolloverModifier 
           s:MouseManager.MouseEventGroup="MySharedMouseGroup"/>
   </s:SciChartSurface.ChartModifier>
</s:SciChartSurface>

The MouseEventGroup attached property will synchronize mouse events across charts. If one chart raises a mouse move event, the other will get it as a secondary event. This way rollovers can be synchronized across charts.

Can you give that a go and let me know if it works?

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.