ChartView
ChartView copied to clipboard
Thousands of Data Points
I have a data set consisting of 2,000-3,300 plots on the x axis, is there a way to make these more visible? I can't see any of my lines. The only problem is the y plots are only between 0-15
Sorry, but it's not designed for handling thousands of data points, maybe later
I would guess that you can decrease the data to display chart by removing each second element from your array. It works fine in my case, look at the example:
let dataSource:[Double] = []
func getShortedLineChartData(width: Int) -> [Double] {
var rowData:[Double] = dataSource // your full data source
while rowData.count > width {
rowData = rowData.enumerated().compactMap { index, element in index % 3 == 2 ? nil : element }
}
return rowData
}