Pre loader

1

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

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.

Try SciChart Today

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

Start TrialCase Studies