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

1
0

The X axis was set to two axes as follows.

        <s:SciChartSurface.XAxes>
            <s:NumericAxis DrawMajorBands="True"
                           FlipCoordinates="True"
                           GrowBy="0.1, 0.1"
                           Id="Time1" />
            <s:NumericAxis DrawMajorBands="True"
                           FlipCoordinates="True"
                           GrowBy="0.1, 0.1"
                           Id="Time2" />
        </s:SciChartSurface.XAxes>

We wanted to make it selectable with DataPointSelectionModifier for two axes, so we set as follows.

        <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <s:DataPointSelectionModifier Name="PointMarkersSelectionModifier"
                                              IncludeSeries="False"
                                              IsEnabled="True"
                                              SelectionFill="#B1B5B2B2"
                                              SelectionStroke="#009E9C9C"
                                              XAxisId="Time1" />
                <s:DataPointSelectionModifier Name="PointMarkersSelectionModifier2"
                                              IncludeSeries="False"
                                              IsEnabled="True"
                                              SelectionFill="#B1B5B2B2"
                                              SelectionStroke="#009E9C9C"
                                              XAxisId="Time2" />
                <s:MouseWheelZoomModifier IsEnabled="True" />
                <s:RubberBandXyZoomModifier IsEnabled="False" />
            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>

However, only XAxisId = “Time 1” works correctly.

How can we make two axes selectable?

Version
v5.1.1 Build 11473
  • Andrew
    Good question, we’ll investigate
  • You must to post comments
1
1

Hello Kenichi Kobayashi,

Thank you for reporting this,

I have tried your sample and it seems that’s modifier group is overrided by the SciChartInteractionToolbar and it adds just one DataPointSelectionModifier.

To get your sample to work all you have to do is just to comment out\remove SciChartInteractionToolbar from your window. I mean you better have to specify all modifiers that you need manually and not by the interactionToolbar.

I’ve tested it on our side and seems that it solves the problem, can you try the same and give us your feedback does it work on your side?

By the way SciChartInteractionToolbar is open source control you can customize it as much as want to.

  • You must to post comments
0
0

Just thinking about this, with no easy way to test this, but have you tried setting ReceiveHandledEvents to true on PointMarkersSelectionModifier2? The second instance might just never get the mouse events to do its job…

Mike.

  • You must to post comments
0
0

We tried with ReceiveHandledEvents set to True, but PointMarkersSelectionModifier2 did not work.

There is “SciChart_PointMarkersSelection.csproj” in the sample project of SCIChart.
I attached a project that modified the project’s X axis to two axes.

I selected the range of pink color, but I could not select the point of the chart on Time 2 axis.

Please tell me how to resolve.

  • You must to post comments
0
0

Thank you for your reply.

And getting the code of SciChart.Examples.ExternalDependencies from GitHub and customizing the OnCreateModifiers section.

Before:

        foreach (var exampleMod in exampleModifiers.ChildModifiers.Where(x => GetAppearceInToolbar((ChartModifierBase)x)))
        {
            if (HasToAddUserModifierToModifierGroup(exampleMod, devMods))
            {
                devMods.ChildModifiers.Add(exampleMod);
            }

            if (HasToAddUserModifierToModifierGroup(exampleMod, userMods))
            {
                userMods.ChildModifiers.Add(exampleMod);
            }
        }

After:

        foreach (var exampleMod in exampleModifiers.ChildModifiers.Where(x => GetAppearceInToolbar((ChartModifierBase)x)).Where(a => HasToAddUserModifierToModifierGroup(a, devMods)).ToList())
        {
            devMods.ChildModifiers.Add(exampleMod);
        }
        foreach (var exampleMod in exampleModifiers.ChildModifiers.Where(x => GetAppearceInToolbar((ChartModifierBase)x)).Where(a => HasToAddUserModifierToModifierGroup(a, userMods)).ToList())
        {
            userMods.ChildModifiers.Add(exampleMod);
        }
  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.