Pre loader

Moving from MPAndroidChart to SciChart support of HigLighters

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

1
0

I am moving from MPAndroidChart to SciChart but I am also required to provide the same look and feel on the chart produced.

In this app the line chart has three lineCollections vertically offset from each other in MPAndroidChart i could use the charts getHighLighter().getHightLight(x, y) to retrieve a list of the three HighLighted points. This information is then used to display detailed information on those points in a popup panel not part of the chart.

Further to this the highLighting only happens after a longClick where the HigHlight Lines and the popup info panel then appear. Chart scrolling is also disabled. The popup info panel is then updated with the point information as the highlight moves.

Upon touchUp the highlight and popup info disappear and chart scrolling is then enabled.

The RolloverModifier appears to provide the required highlighting but I am confused on how to get the points currently highlighted.

Version
Api 27
  • You must to post comments
0
0

Hi Simon,

Thanks for your question.

Unfortunately I’m not very familiar with MPAndroidChart API but I believe you can use our HitTest API which is used by our tooltip modifiers to get information about renderable series at some specific point on screen. We have example which shows how to use HitTest API in our demo application. Here a small code example:

        renderableSeries.hitTest(hitTestInfo, touchPoint.x, touchPoint.y, 30);

        // then you can use data series index to extract values from data series
        final int dataSeriesIndex = hitTestInfo.dataSeriesIndex;
        this.xValue = dataSeries.getXValues().get(dataSeriesIndex);
        this.yValue = dataSeries.getYValues().get(dataSeriesIndex);

Hope this will help you!

Best regards,
Yura

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

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

Start TrialCase Studies