Pre loader

VerticalSliceModifier not working with MouseEventGroup

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

0
0

I am stacking a number of SciChartSurfaces in a UniformGrid and using the MouseEventGroup to control modifiers. This works well in my test code for modifiers such as the CursorModifier and RolloverModifier, but when I add a VerticalSliceModifier to the ModifierGroup, it does not work as expected. Each chart gets the vertical slice cursors, but they function independently as if not part of a mouse event group. Are the VerticalSliceModifier(s) compatible with mouse groups? An image of the output is attached. Here is the data template that I’m using:

<ItemsControl.ItemTemplate>
    <DataTemplate>

      <s:SciChartSurface Margin="0,0,0,2" 
          RenderableSeries="{s:SeriesBinding RenderableSeries}"  
          Annotations="{s:AnnotationsBinding Annotations}"
          YAxes="{s:AxesBinding YAxes}"
          XAxes="{s:AxesBinding XAxes}">

        <s:SciChartSurface.ChartModifier>

          <s:ModifierGroup s:MouseManager.MouseEventGroup="{Binding MouseEventGroup}">


            <s:VerticalSliceModifier Name="sliceModifier" ReceiveHandledEvents="True">
              <s:VerticalSliceModifier.VerticalLines>
                <s:VerticalLineAnnotation Style="{StaticResource sliceStyle}" X1="500"/>
                <s:VerticalLineAnnotation Style="{StaticResource sliceStyle}" X1="2000"/>
              </s:VerticalSliceModifier.VerticalLines>
            </s:VerticalSliceModifier>

          </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>
      </s:SciChartSurface>
    </DataTemplate>
  </ItemsControl.ItemTemplate>
</ItemsControl>
Version
5.0.0
Images
  • You must to post comments
0
0

Hi Greg,

Good point. Well the VerticalLineAnnotations in your modifier have an X1 value and are not actually move by the Modifier mouse events, but by dragging the line (in essence the line handles its own mouse handling and movement).

What I suggest you do in this case if you want to sycnrhonize Vertical lines across charts, is bind the X1’s to a common property TwoWay. For example, you might want to have a parent ViewModel which exposes X1 properties and bind to that.

Makes it tricky from an architectural point of view I know, but it’s not a case we’re really considered so far hence workaround is the best option.

Best regards,
Andrew

  • You must to post comments
Showing 1 result
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