Skip to content

Instantly share code, notes, and snippets.

@DavidPiper94
Created December 29, 2021 20:03
Show Gist options
  • Save DavidPiper94/9d65cd4c163c6f555a027adc009ec564 to your computer and use it in GitHub Desktop.
Save DavidPiper94/9d65cd4c163c6f555a027adc009ec564 to your computer and use it in GitHub Desktop.
Example code for article about Audio Graphs - Showing non-continuous data series
private var series: [AXDataSeriesDescriptor] {
let yValuesSeries1 = [4.0, 5.0, 6.0, 3.0, 2.0, 1.0, 1.0, 3.0, 6.0, 9.0]
let dataPointsSeries1 = yValuesSeries1.enumerated().map { index, yValue in
AXDataPoint(x: Double(index), y: yValue)
}
return [
AXDataSeriesDescriptor(
name: "Data Series 1",
isContinuous: false,
dataPoints: dataPointsSeries1
)
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment