Pre loader

Change color of the touched column

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



I’m using scichart for android and trying to change the color of the column that was hit by touch. I have successfully identified which index of the data series that was hit. I’ve looked all over the android documentation but does not find an answer or example for this. This is my onTouch function:

    public boolean onTouch(View view, MotionEvent motionEvent) {
        SciChartSurface surface = (SciChartSurface) view;
        touchPoint.set(motionEvent.getX(), motionEvent.getY());
        surface.translatePoint(touchPoint, surface.getRenderableSeriesArea());

        for (IRenderableSeries renderableSeries : surface.getRenderableSeries()) {
            renderableSeries.hitTest(hitTestInfo, touchPoint.x, touchPoint.y, 30);
            if (hitTestInfo.isHit) {
                Double yValue = consumptionDataSeries.getYValues().get(hitTestInfo.dataSeriesIndex);
                // Todo: Show a text annotation and color the column differently
                Toast.makeText(this.getContext(), yValue.toString(), Toast.LENGTH_SHORT).show();
        return true;

What should I do next?

  • You must to post comments

Hi Linnea

That’s great you solve the issue. Can you share your code so that it can help other users too?


  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.