fl_chart icon indicating copy to clipboard operation
fl_chart copied to clipboard

Getting weird trendline after interaction.

Open Ec04222002 opened this issue 2 years ago • 2 comments

I am getting a weird trendline when LineChart() is used inside a ReorderableListView.builder() widget. I am not sure if these two widgets conflict with each other but whenever I rebuild and hold down on the ListTiles the trendlines appear. More specifically its inside a ReorderableListView.builder(), ClipRRect(), GestureDetector(), Container(), and lastly inside a ListTile() under the title property. I am using flutter 2.10.1 and below is a vid clip of what it look like.

https://user-images.githubusercontent.com/63486469/175170160-222f25f6-58a9-4328-9956-055a3fe93c00.mp4

Ec04222002 avatar Jun 22 '22 23:06 Ec04222002

Make sure your x axis values are sorted! Looks like you are adding a FlSpot with the value and the time of your first item to the end of the list.

RobinJespersen avatar Jul 17 '22 16:07 RobinJespersen

Thank you so much that fixed the problem. Apparently, I was adding to the map, for my fl_spots, during every rebuild.

Ec04222002 avatar Jul 17 '22 18:07 Ec04222002