Pre loader

Tag: Panning

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

1 vote
688 views

Hi everyone,

I have a chart with a ZoomPanModifier that allows to pan over the X axis only, what I’d like to accomplish is to append more data when the user reaches the max value of the axis while panning.

Is there an event to bind to a command or some other way to do something like this in MVVM?
I’d like to avoid using visible range events and only have this behaviour while panning if possible.

Thanks a lot,

Marco

0 votes
5k views

I have a screen with multiple chart surfaces stacked on top of each other within a ScrollView. I can’t use a single chart surface because each of the charts is combined with other types of views to display extra information about the data in the charts.

I have a few issues I’m trying to solve:

  1. Each of the charts uses the same x-axis range. When a user pinches to zoom or drags to pan on a chart, I want all the charts to be synchronized to zoom and pan at the same time. How can I do this?

  2. Because the charts are embedded in a ScrollView, when I use the following modifiers it is very difficult to smoothly zoom and pan without the ScrollView being activated to scroll up and down. How can I make it so that the ScrollView is deactivated from moving while the user is attempting to zoom or pan a chart

surface.chartModifiers.add(
XAxisDragModifier().apply {
dragMode = AxisDragModifierBase.AxisDragMode.Pan
minTouchArea = 1000.0f
}
)
surface.chartModifiers.add(
PinchZoomModifier().apply {
direction = Direction2D.XDirection
}
)

0 votes
10k views

I am working on the spectrogram (heatmap) that can be interacted with fingers. It can only pan horizontally, and the Z values from heatmap will be updated whenever panning stopped.

I override onUp function from ZoomPanModifier to fetch the latest x range, which is temporarily logged by VisiableRangeChangeListener. But the issue is, when I’m panning with the finger horizontally, the chart will always be moving a little bit after onUp() occurred. So there’s a difference between the desired x range and actual x range.

Is there a way to get the final x range after a panning action?

Thanks.

  • Gang Xu asked 4 years ago
  • last active 2 years ago
0 votes
11k views

It seems most of the modifiers bring up tooltip data with a pan, and then it goes away when the user lifts their finger. Is there any way to bring up tooltip data with a tap (and does not go away when the finger has lifted)? The main problem that we’re trying to solve is that we would like to be able to pan to look at the chart (and don’t want an axis pan), but would also like to bring up tooltip data.

  • Carolyn asked 5 years ago
  • last active 5 years ago
0 votes
15k views

I cannot get panning to work on the x axis which is a DateTimeAxis. I am databinding the visible range to a property on my view model and the zooming works ok. Also panning on the Y-axis works.

Here is my XAML:

<s:SciChartSurface x:Name="_sciChartSurface" Grid.Row="1" Grid.ColumnSpan="2" RenderableSeries="{s:SeriesBinding PlotViewModels}">
            <s:SciChartSurface.XAxis>
                <s:DateTimeAxis AxisTitle="{Binding HorizontalTitle}" VisibleRange="{Binding HorizontalRange, Mode=TwoWay}" AutoRange="Never"
                            IsStaticAxis="True" DrawMajorBands="False" TextFormatting="dd-MMM-yyyy" SubDayTextFormatting="H:mm:ss:tt"
                            AutoTicks="True"/>
            </s:SciChartSurface.XAxis>
            <s:SciChartSurface.YAxis>
                <s:NumericAxis AxisTitle="{Binding VerticalTitle}" AxisAlignment="Left"  VisibleRange="{Binding VerticalRange}"
                           AutoRange="{Binding AutoRange}" DrawMajorBands="False"/>
            </s:SciChartSurface.YAxis>

            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:RubberBandXyZoomModifier IsXAxisOnly="False" 
                                            ZoomExtentsY="True" 
                                            IsAnimated="True" 
                                            RubberBandFill="#55FFFFFF" RubberBandStroke="#FFFFFFFF" RubberBandStrokeDashArray="2 2">
                    </s:RubberBandXyZoomModifier>

                    <s:ZoomPanModifier ExecuteOn="MouseRightButton" ClipModeX="None" XyDirection="XYDirection" IsEnabled="True" />
                    <!-- Allow Dragging YAxis to Scale -->
                    <s:YAxisDragModifier DragMode="Scale"/>
                    <!-- Allow Dragging XAxis to Pan -->
                    <s:XAxisDragModifier DragMode="Scale" IsEnabled="True"/>

                    <s:MouseWheelZoomModifier ActionType="Zoom" XyDirection="XYDirection"/>

                    <s:ZoomExtentsModifier IsAnimated="True" ExecuteOn="MouseDoubleClick"/>
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>
        </s:SciChartSurface>
0 votes
9k views

Hi,

I’m trying to limit the x-axis panning up to an annotation that I’ve drawn on the graph. This annotation can be beyond the current data’s position (i.e. data’s timestamp is at 5/4/2017 11:00:00, annotation’s position is at 5/4/2017 16:00:00). Is there a method, or any way that I can use to limit the x-axis panning up to the annotation’s position instead of limiting it to the data series’ max X?

Regards.

1 vote
14k views

How do I implement mouse wheel zooming so that the point under the mouse pointer (before zoom), will also be under the mouse pointer after the zoom?
The chart is a 2D chart with DateTime X axis and multiple value Y axes.

1 vote
13k views

Hi Scichart,

I am struggling with a ContextMenu on a SciChartSurface that wont be displayed.

The problem started when i added mouse panning with the right mouse-button which is the same button the ContextMenu is activated on.

So will this combination even work – with both a ContextMenu and mouse panning with the right mouse button?

To manually validate if the ContextMenu should open or if the panning should be enabled, I have tried to get the mouse coordinates manually in C# to see if the mouse was moved(panning) or if it was a click(ContextMenu). This did not work very well when i afterwards started to pan/zoom again.

Do you have a code example using both a ContextMenu and mouse panning using right mouse button?

Best regards,
Jeppe

Showing 8 results

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies