aws / awsui-documentation

Information on how to get started using AWS UI components
Other
235 stars 30 forks source link

How to catch the click event on Bar Chart(or Line Chart,Pie Chart)? #47

Closed hejinzhi closed 2 years ago

hejinzhi commented 2 years ago

I want to get what bar I click on the Bar Chart,how to do it ,Thanks

rubencarvalho commented 2 years ago

Hello!

We currently don't offer any API for detecting a click on the Bar chart. The onHighlightChange event is the closest we currently support.

Could you tell us more about your use case? Why would you need this?

Thank you in advance.

hejinzhi commented 2 years ago

For example, bar chart show all the province ,when i click one bar,i want to show all the cityes under the province(Drill down). But now, I can not get what province i click. Is there any way to do that?Thank you

timogasda commented 2 years ago

Hello!

Unfortunately, this is currently not supported by the bar chart component. The chart components are designed to visualize data. They are not meant to be used for navigation or drill-down.