-
Yes, this is suitable for my needs, but I am sharing my Rollover Modifier in multiple charts how can I manage in that case,because when I TypeCast it ,it generates ClassCastException, how can I overcome that problem: sharedRolloverModifier = sciChartBuilder.newModifierGroup() .withMotionEventsGroup(“SharedMotionEvents”).withReceiveHandledEvents(true) .withRolloverModifier().withReceiveHandledEvents(true).build() .build() roModifier = sharedRolloverModifier!!.childModifiers.get(0) as CustomRolloverModifier
-
withRolloverModifier() returns default RolloverModifier instance, that’s why you have cast exception. You need to create CustomRolloverModifier instance and add it into modifier group. For example you can use withModifier() method: rolloverModifier = CustomRolloverModifier() sharedRolloverModifier = sciChartBuilder.newModifierGroup().withMotionEventsGroup(“SharedMotionEvents”).withReceiveHandledEvents(true).withModifier(rolloverModifier).build()
-
By using this method, TypeCast error is resolved but sharing of Rollover Modifier in multiple charts is not workig, it is working only in one chart, i dont know why because if I use withRolloverModifier() it works fine for multiple charts but by using withModifier() it stops sharing Rollover Modifier for multiple charts
-
Do you set ReceiveHandledEvents = true for CustomRolloverModifier?
-
Yes
-
Can you provide a code which reproduces problem? I tried to use custom RolloverModifier in our multi-pane stock chart example (https://www.scichart.com/example/android-chart-multi-pane-stock-charts-example/) and everything seems to work there.
-
roModifier = CustomRolloverModifier() roModifier!!.renderableSeries.add(rSeriesAverage) roModifier!!.renderableSeries.add(rSeriesMax) roModifier!!.renderableSeries.add(rSeriesMin) sharedRolloverModifier = sciChartBuilder.newModifierGroup() .withMotionEventsGroup(“SharedMotionEvents”).withReceiveHandledEvents(true) .withModifier(roModifier).withReceiveHandledEvents(true).build() roModifier = sharedRolloverModifier!!.childModifiers.get(0) as CustomRolloverModifier
-
I don’t see where you set ReceiveHandledEvents = true for CustomRolloverModifier. Please take a look on my second reply with code below.