Android
App version 3.1.1.4423
I am able to sync two charts and receive events between both charts.
However, I wanted to remove the shared y-axis panning between the charts.
I was able to get this working by setting the “withReceiveHandledEvents(false)” linked to the motion event group and setting the “.withYAxisDragModifier().withReceiveHandledEvents(false)”.
However, the current problem being faced, is that, the cursor is now no longer synced between the two charts as if I had “withReceiveHandledEvents(false)” on the motion event group.
I tried using the cursor modifier group, but this did not provide a syncing cursor between the charts.
Is there a way to sync the cursor between the charts without having the y-axis panning synced as well?
- Eyram Dornor asked 4 years ago
- You must login to post comments
Hi Eyram,
To get desired behavior, you can create 2 ModifierGroups for chart ( ChartModifiers is a collection so it can have multiple entries ) – one with shared events for CursorModifier and another for YAxisDragModifier which shouldn’t be synchronized with other charts:
Collections.addAll(surface.getChartModifiers(),
sciChartBuilder.newModifierGroup()
.withMotionEventsGroup("ModifiersSharedEventsGroup").withReceiveHandledEvents(true)
.withCursorModifier().withReceiveHandledEvents(true).build()
.build(),
sciChartBuilder.newModifierGroup()
.withYAxisDragModifier().withReceiveHandledEvents(true).build()
.build());
Hope this will help you!
Best regards,
Yura
- Yura Khariton answered 4 years ago
-
Hi Yura, That worked! I had “withZoomPanModifier().withReceiveHandledEvents(true).build()” in the group events. This seemed to be the issue. In moving this to the non-shared modifier, the cursor synced appropriately without syncing the y-axis as well.
- You must login to post comments
Please login first to submit.