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 border radius in BarTouchTooltipData #1754

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

MattiaPispisa
Copy link

@MattiaPispisa MattiaPispisa commented Sep 24, 2024

IMPROVEMENT (by @MattiaPispisa) custom border radius in BarTouchTooltipData, LineTouchTooltipData, ScatterTouchTooltipData #1715

@@ -702,6 +705,7 @@ class BarTouchTooltipData with EquatableMixin {
/// also you can set [fitInsideVertically] true to force it to shift inside the chart vertically.
BarTouchTooltipData({
double? tooltipRoundedRadius,
BorderRadius? tooltipBorderRadius,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have the tooltipRoundedRadius property. If you want to add it, please remove the old one.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that’s true, but with the current parameter, all the borders must be the same. I didn’t want to remove the existing one to avoid causing a breaking change.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, we should keep it backward-compatible.
So can you please make the old one tooltipRoundedRadius deprecated? This way we can remove it in the next releases

CHANGELOG.md Outdated
@@ -1,3 +1,6 @@
## UNRELEASED
* **IMPROVEMENT** (by @MattiaPispisa) custom border radius in BarTouchTooltipData, #1715
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to write a changelog here, please read our contributing guideline

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had read the guidelines, and it was recommended to start from an issue. From the ‘Mention the related issues’ section, what I did seemed correct. What should I have done differently?
Thank you.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, you're right. I'm sorry I forgot to update one part of the guideline.
I just updated it here.

As we had a lot of conflicts in the change log part, I decided to update it by myself. So you don't need to write something.

Maybe, it would be a good idea to just copy-paste yours in the PR's description. This way I can just add it.

@MattiaPispisa
Copy link
Author

Hi @imaNNeo, no problem.

I removed the changelog and included what I had written in the issue description.
I also added the annotation (deprecated) to the parameter.

@imaNNeo
Copy link
Owner

imaNNeo commented Jan 6, 2025

Very nice!
Can you please add the same feature for our LineChart and ScatterChart tooltips to keep the consistency?

Also please rebase your branch.

@MattiaPispisa MattiaPispisa force-pushed the feature/bar_tooltip_radius branch from a8bee94 to 32cfb79 Compare January 19, 2025 10:45
@MattiaPispisa
Copy link
Author

MattiaPispisa commented Jan 19, 2025

Thank you!

I've applied the same changes to both LineChart and ScatterChart. The implementation in LineChart is slightly different because the constructor is a const, and I wanted to keep it that way to avoid introducing a breaking change. The exposed interface remains the same.

I also made a rebased with main branch and updated the pull request description.

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.

2 participants