juliansteenbakker / community_charts

This project is a fork of google/charts.
Apache License 2.0
84 stars 34 forks source link

Feature: Chart behaviour: When tapping on a graph, use maximumDomainDistancePx relative to tap position to select or deselect data point on the graph #26

Open jasaw opened 3 months ago

jasaw commented 3 months ago

When tapping on graph, data point nearest to tap position within the maximumDomainDistancePx radius is selected. If no data point within the maximumDomainDistancePx radius, then the currently selected data point is deselected.

Example usage:

      charts.SelectNearest<String>(
        eventTrigger: charts.SelectionTrigger.tap,
        maximumDomainDistancePx: 10,
        useRelativeDistance: true,
      );