From 80014424acbf80cda3ebaf77736882bdd2bfb8d2 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 14 Nov 2020 21:10:19 +0100 Subject: [PATCH] Fix max height graph --- lib/src/bezier_chart_widget.dart | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/src/bezier_chart_widget.dart b/lib/src/bezier_chart_widget.dart index ba347fd..7d78819 100644 --- a/lib/src/bezier_chart_widget.dart +++ b/lib/src/bezier_chart_widget.dart @@ -1077,6 +1077,11 @@ class _BezierChartPainter extends CustomPainter { void paint(Canvas canvas, Size size) { final height = size.height - config.footerHeight; Paint paintVerticalIndicator = Paint(); + + double infoWidth = 0; //base value, modified based on the label text + double infoHeight = 40; + + try { paintVerticalIndicator ..color = config.verticalIndicatorColor @@ -1189,7 +1194,7 @@ class _BezierChartPainter extends CustomPainter { final double valueY = height - _getRealValue( axisY - (config.startYAxisFromNonZeroValue ? minYValue : 0.0), - height, + height - infoHeight, _maxValueY, ); @@ -1340,8 +1345,7 @@ class _BezierChartPainter extends CustomPainter { (verticalX - p0.dx) / (p3.dx - p0.dx), ); - double infoWidth = 0; //base value, modified based on the label text - double infoHeight = 40; + //bubble indicator padding final horizontalPadding = 28.0;