Closed av8ramit closed 6 years ago
`let v = ChartPointTextCircleView(chartPoint: chartPoint, center: screenLoc, diameter: 16, cornerRadius: 8, borderWidth: 0, font: ChartDefault.fontWithSize( 8))
if ( number <= 2) {
v.layer.backgroundColor = UIColor.Black.cgColor
} else {
v.layer.backgroundColor = UIColor.White.cgColor
}`
I do not know how to do it differently.
@danieldesouzadev good idea, I ended up declaring the generator in my for loop. Thanks!
I want to change the color of
ChartPointTextCircleView
programmatically based on which line they are attached to. TheChartPointsViewsLayer
constructor takes in acircleViewGenerator
but outside of creating multiple of these I'm not sure how I can programmatically pass in the color.