Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

How can I programatically select a point in a Line Chart? #71

Closed
palkatap opened this issue Jul 9, 2018 · 2 comments
Closed

How can I programatically select a point in a Line Chart? #71

palkatap opened this issue Jul 9, 2018 · 2 comments

Comments

@palkatap
Copy link

palkatap commented Jul 9, 2018

I have a series of Line Charts (with the same number of points), and whenever I click on a point in a chart, I want to synchronize other charts (see https://github.com/palkatap/flutter_monitor).
How can I do this?

@lorrainekan
Copy link
Contributor

You would have to listen to the selection of the first chart and write a chart behavior that changes the value of the chart.

Listening to the chart is fairly simple:
https://google.github.io/charts/flutter/example/behaviors/selection_callback_example

However, we don't have a behavior that changes the selection of the chart other than the initial selection.
https://google.github.io/charts/flutter/example/behaviors/initial_selection

You could use that code as a jumping point to write your own behavior.
https://github.com/google/charts/blob/c0e20095d9fec59b0a65b338402b204644d12e18/charts_common/lib/src/chart/common/behavior/initial_selection.dart

@angel1st
Copy link

@palkatap - did you achieve setting selection programatically? I have (almost) identical issue - #208 and I would appreciate if you can help me with...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants