-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Dynamically changing tooltipBgColor #1279
Comments
So we need to implement a callback to receive a color based on the provided data to paint the background. |
I am currently in such a dilemma. For every tooltip provided for a barChart rod, I want each rod to be able to have a different tooltip background color. |
Hi, I have been working as an iOS application developer for about 4.5 years, and I am currently learning Flutter. I would like to contribute to your open-source project, starting with the change mentioned above. I am in the process of setting up the code base. |
@apekshamehta Correct choice :)) You can start working on this issue, read the code, you can find some samples that we have a callback to get the color from the user. Don't forget to read the contributing guideline |
@imaNNeo I wanted to provide an update regarding the changes I made. The implementation can be reviewed in my branch named "feature/dynamic-tooltip-bgcolor." Additionally, I have provided comprehensive details regarding the changes in my pull request. I kindly request your valuable feedback on the modifications I have made. |
Good to have your PR ready, I've written some comments. check them out |
This feature looks good. @imaNNeo can we expect this anytime soon? |
There are 2 lines with different colors on a chart, and they have |
Added |
Don't make a duplicate issue.
I didn't find anything like this, sorry if i missed something
Is your feature request relasted to a problem? Please describe.
I would like to be able to dynamically change the
tooltipBgColor
, in the same waygetTooltipItems
allows to change the text of a tooltipDescribe the solution you'd like
Ideally this change would be included in the
tooltipItem
so that also the popup can be configured in the same place, the expected behaviour at the end is the ability to show tooltips of different colors based on the y value of the line, (i.e: i would like to have tooltips for points below 0 to have a black background and tooltips above 0 to have a white background)Describe alternatives you've considered
i have considered just changing the color of the text, but changing the color of the background is really what i would like to achieve
Additional context
This is the tooltip i'm talking about, i hope it's clear enought even if i don't provide example with both colors
If there is already a way to do this could you show me an example?
The text was updated successfully, but these errors were encountered: