add title property to BarChartRodStackItem
- Dominant language
- Dart
- Stars
- 7.6k
- Forks
- 2k
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 2
Description
**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.
Contributor guide
Research direction
Start by locating BarChartRodStackItem and the BarChart touchCallBack handling. Trace how zero-valued items affect the reported index, then verify that a title can be accessed for the touched item and remains associated with its value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100