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

0
0

Hello, I was using version 4.2 before, but today I updated to version 4.4. I was using the updateCurrentPoint function in the CustomRolloverModifier in my project, but this function has changed in version 4.3. How can I use the updateCurrentPoint function in version 4.4?

Version
4.4.0.4739
  • You must to post comments
1
1

Hi Devrim,

It’s hard to tell how to fix updateCurrentPoint in your specific case without seeing your code. Can you provide some code which explains your use case?

As for updateCurrentPoint() – it was changed to fix a bug in multichart scenario and we’ve changed return type from void to boolean. This return value indicates whether currentPoint, that should be set by updateCurrentPoint(), lies within master chart ( e.g. current chart, that current modifier instance is attached to ) or it’s outside of it’s bounds. By default it checks if updated point lies within ChartModifierSurface ( it’s placed at the center of chart where all series are rendered ) of current chart:

protected boolean updateCurrentPoint(PointF currentPoint, ModifierTouchEventArgs args) {
    final IChartModifierSurface modifierSurface = getModifierSurface();
    if(modifierSurface == null) throw new UnsupportedOperationException("ModifierSurface should be not null");

    args.setEventPointRelativeTo(currentPoint, modifierSurface);

    return modifierSurface.isPointWithinBounds(currentPoint.x, currentPoint.y);
}

If you don’t share touch events between several charts, then you can copy paste this check in your method override and it should work.

Hope this will help you!

Best regards,
Yura

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.