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

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.