flutter-charts icon indicating copy to clipboard operation
flutter-charts copied to clipboard

Incorrect Offset calculation in TargetLineDecoration

Open vsilux opened this issue 3 years ago • 0 comments

When we setting ChartData. axisMin the Offset in TargetLineDecoration.applyPaintTransform calculates wrongly.

The problem is in: Offset(state.defaultPadding.left + state.defaultMargin.left, _height - (state.defaultMargin.bottom + state.defaultPadding.bottom) - (scale * (target ?? 0.0) + _minValue);

instead of adding _minValue we should subtract it from scale * (target ?? 0.0)

vsilux avatar Jan 24 '22 13:01 vsilux