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

0 votes
72 views

Hello!

I want the chart to scroll from right to left and stop at left side. Don’t automatically scale, don’t move right.

I have a modifier:

ZoomPanModifier zoomModifier = new ZoomPanModifier() { ... };
zoomModifier.setReceiveHandledEvents(true);
zoomModifier.setXyDirection(XyDirection.XDirection);
zoomModifier.setClipModeX(ClipMode.ClipAtExtents);
// zoomModifier.setClipModeX(ClipMode.ClipAtMin);

When I scroll a chart left to the beginning, it scales the chart to one screen. So, all points are visible, proportions are broken.
When I replace “ClipMode.ClipAtExtents” to “ClipMode.ClipAtMin”, it sometimes stops at left side (as desired), but if I swipe too fast, it shows a right part of the chart and continues to scroll left.
Currently a first version of the SciChart library is installed.
As written in https://www.scichart.com/documentation/android/v1.x/SciChart.Charting~com.scichart.charting.ClipMode.html both “ClipAtExtents” and “ClipAtMin” have another behaviour.
My question is similar to https://www.scichart.com/questions/question/disable-scaling-on-zoompanmodifier, but for Android.

Answer, please, is it a bug? Has it been already fixed or expected to be fixed?

  • Alex N asked 1 month ago
  • last active 1 month ago
0 votes
336 views

Hi, guys

My x axis is SCICategoryDateTimeAxis class type. And it’s limited by VisiableRangeLimit like:

[xAxis setVisibleRangeLimit:[[SCIDoubleRange alloc] initWithMin:SCIGeneric(firstItem – (lastItem – priorItem))
Max:SCIGeneric(lastItem + (lastItem – priorItem))]];

Also for scrolling my content inside chart:

SCIZoomPanModifier * zpm = [[SCIZoomPanModifier alloc] init];
[zpm setModifierName:@"PanZoom Modifier"];
[zpm setClipModeX:SCIZoomPanClipMode_ClipAtExtents];

Like a description SCIZoomPanClipMode_ClipAtExtents says:
“forces the panning operation to stop suddenly at the extents of the data” – but it’s not working constantly.
Sometimes it’s allow to scroll outside the range. Like on the attached image.

So my question is how to limit scrolling by min and max value?

Best regards,
Sushynski Andrei

1 vote
706 views

Hello again,

I use ZoomPanModifier in my application. I’ve rotated my chart: I’ve set XAxis.AxisAlignment to “Left” and YAxis.AxisAlignment to “Bottom”. I’ve also set YAxis.AutoRange property to “Never”. When I try to pan my chart, the yaxis extends to all data ranges of renderable series.

Is this a bug? Or need I set a flag to make the y-axis not to extend

Thank’s in advance

I’ve attached GIF (if it doesn’t render) and project below.

  • Egor asked 1 year ago
  • last active 1 year ago
0 votes
913 views

I am using SciChart to draw some graph on my application.
I use ZoomPanModifier to be able to zoom and drag the graph (with range limit).

<s:ZoomPanModifier ClipModeX="ClipAtExtents" XyDirection="XYDirection" ZoomExtentsY="True" ExecuteOn="MouseLeftButton" IsEnabled="True"/>

But the problem is when I drag to the edge of the graph, it will scale up automatically when I keep dragging.

Is there any way so that I can zoom in/out, drag graph (after zooming in), and no dragging and scaling up when I get to the edge of graph?

0 votes
3k views

Hi All,

I’ve read the following forum entry on using a context menu with and ALT-Right click to get around problems with event interference:

https://www.scichart.com/questions/question/contextmenu-does-not-work-on-graph-when-panning-is-enabled-by-right-mouse-button

I have the same problem with zoom and implemented the solution mentioned above. Then I noticed on one of my test apps that the two would live side by side quite nicely without doing anything BUT it made selecting a scatter series trickier. i found that using ReceiveHandledEvents had an effect on the behaviour in that while this was false zoom and context were fine but selecting a series was a bit hit and miss, but while it was true the behaviour in the link was displayed i.e. context menu appearing after zoom operation.

Here’s the XAML;

        <s:SciChartSurface x:Name="ChartSurface" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" s:ThemeManager.Theme="Chrome">

        <s:SciChartSurface.ContextMenu>
            <ContextMenu>
                <MenuItem Header="Item1" />
                <MenuItem Header="Item2" />
                <MenuItem Header="Item3" />
                <MenuItem Header="Etc.." />
            </ContextMenu>
        </s:SciChartSurface.ContextMenu>

        <s:SciChartSurface.XAxis>
            <s:DateTimeAxis AutoRange="Once"/>
        </s:SciChartSurface.XAxis>

        <s:SciChartSurface.YAxes>
            <s:NumericAxis x:Name="LinearAxis" Id="LinearAxis" AutoRange="Always" AxisAlignment="Left" AxisTitle="Linear" Style="{StaticResource LinearScaleStyle}"/>
        </s:SciChartSurface.YAxes>

        <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <s:RubberBandXyZoomModifier x:Name="rubberBandZoomModifier" IsEnabled="True" IsXAxisOnly="False" IsAnimated="True" ExecuteOn="MouseRightButton" ZoomExtentsY="False" ReceiveHandledEvents="True"/>
                <s:ZoomPanModifier x:Name="zoomPanModifier" ExecuteOn="MouseLeftButton" ZoomExtentsY="False" ReceiveHandledEvents="True" IsEnabled="True" XyDirection="XDirection"/>

                <!--
                ReceiveHandledEvents * True = context menu appears on completion of a right mouse button zoom operation
                ReceiveHandledEvents * False = Zoom and Context menu are fine but selecting a series needs a slow double click type thing
                -->
                <s:SeriesSelectionModifier ReceiveHandledEvents="True">
                </s:SeriesSelectionModifier>
                <s:LegendModifier x:Name="SelectedSeriesLegend" ShowLegend="True" GetLegendDataFor="SelectedSeries" Margin="5" SourceMode="AllVisibleSeries" />
            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>

    </s:SciChartSurface>

Can anyone explain this? Is there an accepted workaround? are there any other easy methods of selecting a series that don’t involve clicking on it (e.g. select from legend)?

Thanks in advance

/Stu

1 vote
3k views

Hello,

I have ClipModeX=”ClipAtExtents” on my ZoomPanModifier. I need the same behavior on the y-axis, but there is no “ClipModeY”.

How do I prevent y-axis data from panning off the chart?

Thanks,
Neville

Showing 6 results
This template supports the sidebar's widgets. Add one or use Full Width layout.