Pre loader

series selection listener for stacked columns

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


Referring to the stacked column side by side example in the android examples collection, if someone clicks on a column/series in that chart, how could i identify which the of columns has been selected (usa, china, india, etc).

  • You must to post comments

Hi Marcus,

I’m afraid we have a limited support of SeriesSelectionModifier for stacked series, because it can only select/deselect entire renderable series from renderable series collection of chart, so in case of stacked series it can only select/deselect all series or none of them. To add proper support for stacked series you would need to create custom selection modifier.

Theretically you can use our hit test API ( we have an example which shows how to use it ) to determine which renderable series was hit at specified coordinates of chart ( You can get series name from this HitTestInfo like this and check if match name set for DataSeries(e.g. USA, China, India etc ):

    final IRenderableSeries hitRenderableSeries = hitTestInfo.hitRenderableSeries;
    if(hitRenderableSeries != null) {
        final String seriesName = hitRenderableSeries.getDataSeries().getSeriesName();

Hope this will help you!

Best regards,

  • Marcus Maringer
    Thank Yura for your quick reply. that seems to work thanks. Although I am wondering why the onTouch event is always called twice (its also called twice in the hit test api example)
  • Marcus Maringer
    i am using the onSingleTapConfirmed of custom SelectionModifier instead
  • Yura Khariton
    Hi Marcus, onTouch() is internally called by Android OS during dispatching MotionEvent through View hierarchy. Have you checked MotionEvent’s action? I believe it’s possible that first time it could be ACTION_DOWN and second time ACTION_UP.
  • You must to post comments
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.