fl_chart
fl_chart copied to clipboard
Getting weird trendline after interaction.
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
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.
Thank you so much that fixed the problem. Apparently, I was adding to the map, for my fl_spots, during every rebuild.