-
-
Save prabakarviji/7fb17072a6283a7d491878fd69d2c247 to your computer and use it in GitHub Desktop.
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
func configurePlot(){ | |
plot = CPTScatterPlot() | |
let plotLineStile = CPTMutableLineStyle() | |
plotLineStile.lineJoin = .round | |
plotLineStile.lineCap = .round | |
plotLineStile.lineWidth = 2 | |
plotLineStile.lineColor = CPTColor.white() | |
plot.dataLineStyle = plotLineStile | |
plot.curvedInterpolationOption = .catmullCustomAlpha | |
plot.interpolation = .curved | |
plot.identifier = "coreplot-graph" as NSCoding & NSCopying & NSObjectProtocol | |
guard let graph = hostView.hostedGraph else { return } | |
plot.dataSource = (self as CPTPlotDataSource) | |
plot.delegate = (self as CALayerDelegate) | |
graph.add(plot, to: graph.defaultPlotSpace) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment