Hi I am implementing a chart on Android with 24 Hours of data viewable in 1, 2, 4, 8, 12 and 24 hours windows. The chart is drag-able upon the xAxis only. The full extent of the yAxis is always visible.
I am struggling to control the rate of scroll compared to the drag speed. What is desired is always a perceived one to one ratio of movement. This means that a data point’s movement distance when scrolled is the same is the point of touch’s movement distance regardless of zoom level.
I am currently using:
ChartModifierCollection surfaceChartModifiers = surface.getChartModifiers(); XAxisDragModifier dragModifier = new XAxisDragModifier(); dragModifier.setDragMode(AxisDragModifierBase.AxisDragMode.Pan); dragModifier.setClipModeX(ClipMode.ClipAtExtents); surfaceChartModifiers.add(dragModifier); ZoomPanModifier zoomPanModifier = new ZoomPanModifier(); zoomPanModifier.setClipModeX(ClipMode.ClipAtExtents); zoomPanModifier.setDirection(Direction2D.XDirection); zoomPanModifier.setZoomExtentsY(false); surfaceChartModifiers.add(zoomPanModifier);
Currently however the ratio does not appear to be one to one the scrolling move further than the touch drag distance.
How can I achieve this?
Is the issue resolved? In SciChart by default the ratio of drag pixels to drag on the screen is 1:1. I think its possible if you double-add modifiers to get some interacting badly as you’ve seen.
If you come across any issues like this in the future, let us know and we’ll do our best to help.
Please login first to submit.