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

All Answers » Re: Disable Rollover Modifier for Specific Series. » Comments for "Re: Disable Rollover Modifier for Specific Series."
  • Atiq Tahir
    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
  • Yura Khariton
    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()
  • Atiq Tahir
    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
  • Yura Khariton
    Do you set ReceiveHandledEvents = true for CustomRolloverModifier?
  • Atiq Tahir
    Yes
  • Yura Khariton
    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.
  • Atiq Tahir
    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
  • Yura Khariton
    I don’t see where you set ReceiveHandledEvents = true for CustomRolloverModifier. Please take a look on my second reply with code below.