mzimmerm / flutter_charts

Charts Library for Flutter, written in Dart with Flutter.
Other
253 stars 42 forks source link

Ensure the chart area is clipped in charts to the `size` passed to `paint(ui.Canvas canvas, ui.Size size)` #7

Closed mzimmerm closed 2 years ago

mzimmerm commented 6 years ago

Right now, wide labels can cause the paint(ui.Canvas canvas, ui.Size size) to paint outside the area passed by the size parameter. There are a few ways to clip this, the most obvious, adding

 canvas.clipRect(const ui.Offset(0.0, 0.0) & size); 

at the end of the paint method seems to be doing "nothing". Investigate why and find a way to achieve clipping.

mzimmerm commented 2 years ago

This has been fixed in v. 0.1.8 by adding the labels auto-layout