Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…echart into JacobJust-master
  • Loading branch information
AndriiHarashchak committed May 29, 2022
2 parents 716346e + 60c178c commit 3325470
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/chart/animated_line_chart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -435,17 +435,17 @@ class ChartPainter extends CustomPainter {
tp.paint(canvas, Offset(_chart.xAxisOffsetPX, -20)); //-16
}

// if (_chart.indexToUnit.length == 2) {
// TextSpan span = TextSpan(style: style, text: _chart.yAxisName ?? _chart.indexToUnit[1]);
// TextPainter tp = TextPainter(
// text: span,
// textAlign: TextAlign.right,
// textDirection: TextDirectionHelper.getDirection());
// tp.layout();

// tp.paint(canvas,
// Offset(size.width - tp.width - _chart.xAxisOffsetPXright, -16));
// }
if (_chart.indexToUnit.length == 2) {
TextSpan span = TextSpan(style: style, text: _chart.indexToUnit[1]);
TextPainter tp = TextPainter(
text: span,
textAlign: TextAlign.right,
textDirection: TextDirectionHelper.getDirection());
tp.layout();

tp.paint(canvas,
Offset(size.width - tp.width - _chart.xAxisOffsetPXright, -16));
}
}

void _drawGrid(Canvas canvas, Size size) {
Expand Down

0 comments on commit 3325470

Please sign in to comment.