fl_chart icon indicating copy to clipboard operation
fl_chart copied to clipboard

Clip data removes border

Open parmarravi opened this issue 2 years ago • 4 comments

fl_chart: ^0.50.1

FlClipData.none() Screenshot 2022-04-23 at 3 05 16 PM

FlClipData.all() Removes Border around graph and also clip the max data

Screenshot 2022-04-23 at 3 04 10 PM

parmarravi avatar Apr 23 '22 09:04 parmarravi

Facing this same issue at the moment.

With clipData: FlClipData.all(), Screenshot from 2022-06-03 17-13-10

With clipData: FlClipData.none(), Screenshot from 2022-06-03 17-11-06

Has anyone found any workaround for this?

praveengitsit avatar Jun 03 '22 11:06 praveengitsit

i had the same problem. fl_chart: 0.46.0

After changing the code as below, the border is now displayed

src/chart/line_chart/line_chart/line_chart_painter.dart void clipToBorder() left = getLeftOffsetDrawSize(holder) + (borderWidth / 2); //original left = getLeftOffsetDrawSize(holder) - (borderWidth / 2); //After change top = getTopOffsetDrawSize(holder) + (borderWidth / 2); //original top = getTopOffsetDrawSize(holder) - (borderWidth / 2); //After change right = getLeftOffsetDrawSize(holder) + usableSize.width - (borderWidth / 2); //original right = getLeftOffsetDrawSize(holder) + usableSize.width + (borderWidth / 2); //After change bottom = getTopOffsetDrawSize(holder) + usableSize.height - (borderWidth / 2); //original bottom = getTopOffsetDrawSize(holder) + usableSize.height + (borderWidth / 2); //After change

ShippokuUdon avatar Sep 21 '22 05:09 ShippokuUdon