-
-
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
Added Tooltip border color and width support #917
Conversation
In other to improve the test coverage, we should remove the example directory because we don't want that also the example enter inside the scoring. Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
…t_painter_test.dart
…_chart_painter_test.dart
…y are abstract and data classes)
…pieChart badgeWidgets), imaNNeo#861
…ms on showing titles when min, max values are below than 1.0)
* feat: Introduce 'clipBubble' attribute to scatter chart. * fix: remove `clipBubble` attribute and implement `clipData` function in scatter chart. * added issue fix imaNNeo#897 to changelog. * modify clip equation to resolve border issue. Co-authored-by: prajwal27wiijii <prajwal@wiijii.co>
* Fix lineChart clipData issue with border, imaNNeo#898 * Update CHANGELOG.md
…zero (imaNNeo#894) * Fix getBestInitialIntervalValue() problem with values above or below zero, imaNNeo#893. * Add `baselineX` and `baselineY` property to all of our axis-based charts (Line, Bar, Scatter). default is zero, imaNNeo#893. * Remove all linux/flutter/ephemeral files from example directory * Update CHANGELOG.md, bar_chart.md, and line_chart.md * Update line_chart.md * Update CHANGELOG.md
## 0.0.1 - Released on (2019 June 4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this line is changed?
@@ -642,6 +642,12 @@ class BarTouchTooltipData with EquatableMixin { | |||
/// The tooltip background color. | |||
final Color tooltipBgColor; | |||
|
|||
/// The tooltip border color. | |||
final Color tooltipBorderColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to have a BorderSide (which contains color
and width
) Instead of defining two variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea
@@ -668,6 +672,10 @@ class BarChartPainter extends AxisChartPainter<BarChartData> { | |||
bottomLeft: radius, | |||
bottomRight: radius); | |||
_bgTouchTooltipPaint.color = tooltipData.tooltipBgColor; | |||
if (tooltipData.tooltipBorderWidth > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please check the opacity of color too here?
Because sometimes people set a transparent color, which we don't need to draw anything.
(Maybe it's better to have an extension function like borderSide.isVisible()
)
extension BorderSideExtension on BorderSide {
bool isVisible() => color.opacity > 0 && width > 0;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please apply it to other places.
Codecov Report
@@ Coverage Diff @@
## dev #917 +/- ##
==========================================
- Coverage 80.99% 80.85% -0.15%
==========================================
Files 32 32
Lines 3026 3050 +24
==========================================
+ Hits 2451 2466 +15
- Misses 575 584 +9
Continue to review full report at Codecov.
|
37fb6f1
to
711c937
Compare
Our branching approach has just changed. We had to remove the |
#692