Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add title property to BarChartRodStackItem #1371

Open
ImagineBoom opened this issue Jun 20, 2023 · 0 comments · May be fixed by #1372
Open

add title property to BarChartRodStackItem #1371

ImagineBoom opened this issue Jun 20, 2023 · 0 comments · May be fixed by #1372

Comments

@ImagineBoom
Copy link

Is your feature request relasted to a problem? Please describe.
In the touchCallBack function of BarChart, we can only get the index and value of the currently touching BarChartRodStackItem, but not the name of the value. However, it’s hard to get the name corresponding to the value directly through the index, because the 0 value will not be displayed in the chart. This means that some BarChartRodStackItems have a value of 0, the indexes that originally belongs to them are assigned to other BarChartRodStackItems whose value is not 0. So we can’t directly get the name corresponding to the value/index of BarChartRodStackItem.

Describe the solution you'd like
Add a title property to the BarChartRodStackItem so that when we touch the BarChartRodStackItem, we can easily get the title that corresponds to its value.

Describe alternatives you've considered
Before adding the title property to the BarChartRodStackItem, I had used a calculation function to skip items with a value of 0 and get the correct item. However this is not convenient for dynamic arrays and means that a function needs to be added synchronously for each new scene to maintain it.
截屏2023-06-20 14 06 00

@ImagineBoom ImagineBoom linked a pull request Jun 20, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants