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

custom BarTooltipItem as per BarChartRodStackItem #393

Closed
harishrathi opened this issue Jul 15, 2020 · 2 comments
Closed

custom BarTooltipItem as per BarChartRodStackItem #393

harishrathi opened this issue Jul 15, 2020 · 2 comments
Labels
Bar Chart enhancement New feature or request

Comments

@harishrathi
Copy link

harishrathi commented Jul 15, 2020

As per the current implementation of BarTooltipItem, the function to customize the tooltip is as below

BarTooltipItem touchTooltipData(BarChartGroupData group, int groupIndex, BarChartRodData rod, int rodIndex)

The callback is missing the index for stack position, because of this the tooltip cannot be customized as per stack position.

Versions

  • Flutter: 1.17.5
  • FlChart: 0.10.1
@imaNNeo imaNNeo added Bar Chart enhancement New feature or request labels Jul 26, 2020
imaNNeo added a commit that referenced this issue Jul 26, 2020
…e BarTouchedSpot to determine in which BarChartRodStackItem click happened, #393.
@imaNNeo
Copy link
Owner

imaNNeo commented Jul 26, 2020

Added touchedStackItem and touchedStackItemIndex properties in the BarTouchedSpot ,
check it out in the 0.11.0 version.
Thanks for your suggestion!

@imaNNeo imaNNeo closed this as completed Jul 26, 2020
@harishrathi
Copy link
Author

harishrathi commented Aug 16, 2020

But this still does not help with tooltop, I am specifically talking about callback defined to get tooltip text...
BarTooltipItem touchTooltipData(BarChartGroupData group, int groupIndex, BarChartRodData rod, int rodIndex),

Can you pass BarTouchedSpot to touchTooltipData (property of BarTouchData)? It would be a breaking change, but would be better than having 6 parameters to a function.

ezmegy pushed a commit to ezmegy/fl_chart that referenced this issue Nov 16, 2020
…e BarTouchedSpot to determine in which BarChartRodStackItem click happened, imaNNeo#393.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bar Chart enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants