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

Dynamically changing tooltipBgColor #1348

Closed

Conversation

apekshamehta
Copy link

Changes Made:

In the bar_chart_data.dart file:

  • Added a new parameter getTooltipColor to the constructor of BarTouchTooltipData.
  • Defined a new type GetBarTooltipColor, which is a function that takes a BarChartGroupData parameter and returns a Color.

In the bar_chart_painter.dart file:

  • Assigned the tooltip color to the _bgTouchTooltipPaint.color property using the getTooltipColor function from the tooltipData object.

Additionally, the getTooltipColor function has been utilized in the bar_chart_sample1.dart file within the feature/dynamic-tooltip-bgcolor branch.

Please review the changes for this pull request.

@imaNNeo
Copy link
Owner

imaNNeo commented Jun 7, 2023

  1. Please read our contributing guidelines carefully
  2. Please update our CHANGELOG
  3. Please update our docs (bar_chart.md)
  4. Please do the same for other axis-based charts such as line chart and scatter chart

@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Merging #1348 (274d888) into master (c8dc3c0) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1348      +/-   ##
==========================================
+ Coverage   86.62%   86.64%   +0.01%     
==========================================
  Files          45       45              
  Lines        3014     3017       +3     
==========================================
+ Hits         2611     2614       +3     
  Misses        403      403              
Files Coverage Δ
lib/src/chart/bar_chart/bar_chart_painter.dart 96.12% <100.00%> (ø)
lib/src/chart/line_chart/line_chart_painter.dart 92.09% <100.00%> (+0.04%) ⬆️
...src/chart/scatter_chart/scatter_chart_painter.dart 85.39% <100.00%> (ø)

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@apekshamehta
Copy link
Author

  1. Please read our contributing guidelines carefully
  2. Please update our CHANGELOG
  3. Please update our docs (bar_chart.md)
  4. Please do the same for other axis-based charts such as line chart and scatter chart

Ok i am starting with first 3 points. Will continue with 4th point once i get confirmation for the change i have made for the bar chart.

@imaNNeo
Copy link
Owner

imaNNeo commented Jun 14, 2023

I've answered

@apekshamehta
Copy link
Author

apekshamehta commented Jun 22, 2023

I have done all the

  1. Please read our contributing guidelines carefully
  2. Please update our CHANGELOG
  3. Please update our docs (bar_chart.md)
  4. Please do the same for other axis-based charts such as line chart and scatter chart

this is also done. please review and close the pr. also in the meantime did get a good grasp on dart. so open to some exciting new issues that are of priority. thanks @imaNNeo

pubspec.yaml Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
@imaNNeo
Copy link
Owner

imaNNeo commented Jul 31, 2023

I think you also need a rebase,
After that, we are ready to merge it.
Thanks in advance!

@imaNNeo
Copy link
Owner

imaNNeo commented Aug 22, 2023

I think you need to rebase your branch.

@imaNNeo
Copy link
Owner

imaNNeo commented Sep 14, 2023

You should rebase your branch. So when you merge master into your branch you cannot rebase anymore.
Please fix your commits (you can reset your branch and commit your changes again and then you can force push to override the remote commits)

apeksha mehta and others added 7 commits October 4, 2023 18:34
…ter Charts, Added new method called getTooltipColor for which user can provide their own custom implementation to change backgroud color for each tooltip of given chart, Updated sample charts, Updated test cases, Updated bar_chart.md,line_chart.md and scatter_chart.md files for the brief description about new method, Updated version code in pubspec
Apeksha Mehta and others added 21 commits November 5, 2023 14:10
…ter Charts, Added new method called getTooltipColor for which user can provide their own custom implementation to change backgroud color for each tooltip of given chart, Updated sample charts, Updated test cases, Updated bar_chart.md,line_chart.md and scatter_chart.md files for the brief description about new method, Updated version code in pubspec
…lass.

reverted back to the previous version which was 0.63.0.
changed default color specification in all charts md files.
…ter Charts, Added new method called getTooltipColor for which user can provide their own custom implementation to change backgroud color for each tooltip of given chart, Updated sample charts, Updated test cases, Updated bar_chart.md,line_chart.md and scatter_chart.md files for the brief description about new method, Updated version code in pubspec
…lass.

reverted back to the previous version which was 0.63.0.
changed default color specification in all charts md files.
…tooltip background color in handle_touches.md file
…ter Charts, Added new method called getTooltipColor for which user can provide their own custom implementation to change backgroud color for each tooltip of given chart, Updated sample charts, Updated test cases, Updated bar_chart.md,line_chart.md and scatter_chart.md files for the brief description about new method, Updated version code in pubspec
…lass.

reverted back to the previous version which was 0.63.0.
changed default color specification in all charts md files.
…ter Charts, Added new method called getTooltipColor for which user can provide their own custom implementation to change backgroud color for each tooltip of given chart, Updated sample charts, Updated test cases, Updated bar_chart.md,line_chart.md and scatter_chart.md files for the brief description about new method, Updated version code in pubspec
…lass.

reverted back to the previous version which was 0.63.0.
changed default color specification in all charts md files.
…tooltip background color in handle_touches.md file
@imaNNeo
Copy link
Owner

imaNNeo commented Nov 5, 2023

Hi, I'm sorry I think I ruined something here :)
I wanted to rebase your branch and resolve the new conflicts, but I have stolen your commits and everything is in my name.
Can you please create a fresh PR and commit everything to your name?

@apekshamehta
Copy link
Author

apekshamehta commented Dec 22, 2023

Hi, I'm sorry I think I ruined something here :) I wanted to rebase your branch and resolve the new conflicts, but I have stolen your commits and everything is in my name. Can you please create a fresh PR and commit everything to your name?

@imaNNeo Hey,I am really sorry for the delay. will complete this by today.

@xvrh
Copy link
Contributor

xvrh commented Feb 16, 2024

@apekshamehta @imaNNeo I'm interested in this feature.
I rebased and squashed the work of this branch here: https://github.com/xvrh/fl_chart/commits/feature/dynamic-tooltip-bgcolor/
How can we move this forward to be merged?

Thanks!

@apekshamehta
Copy link
Author

@apekshamehta @imaNNeo I'm interested in this feature. I rebased and squashed the work of this branch here: https://github.com/xvrh/fl_chart/commits/feature/dynamic-tooltip-bgcolor/ How can we move this forward to be merged?

Thanks!

I have tested the changes and they are working as expected let's get this merged

@imaNNeo
Copy link
Owner

imaNNeo commented Feb 28, 2024

This PR contains 80 wrong commits (my bad).
Can you please create a new PR with your single commit?

@imaNNeo
Copy link
Owner

imaNNeo commented Feb 28, 2024

Don't forget to mention this PR to have it in the history if you created a new one

@xvrh
Copy link
Contributor

xvrh commented Feb 29, 2024

PR created here: #1595

@imaNNeo imaNNeo closed this Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants