Created
December 29, 2021 20:03
-
-
Save DavidPiper94/9d65cd4c163c6f555a027adc009ec564 to your computer and use it in GitHub Desktop.
Example code for article about Audio Graphs - Showing non-continuous data series
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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