I am trying to manipulate some core data that I have stored and display it in a line chart. I have it working (for the most part) but now want to only display (chart) the last 10 items in my core data. I have my X and Y stored in
var lineChartEntry = [ChartDataEntry]() which is populated from my do loop reading core.
I have tried things like
.suffix which works in debug mode but the slice errors when I feed it to
LineChartDataSet(values: lineChartEntry, label: "Recorded Weight").
Ideas would be well appreciated!