Hi,
I am creating iOS aplication which displays charts based on stocks data.
I want to create box annotations to show when market is open or closed.
I am using CategoryDateTimeAxis to display data but when i add AnnotationCollection with BoxAnnotations to Surface i can not see the annotations.
This is my code for creating box Annotation:
let pre = SCIBoxAnnotation()
pre.coordinateMode = .relative
pre.x1 = SCIGeneric(setDate(date, 4, 0, 0)!)
pre.x2 = SCIGeneric(setDate(date, 9, 30, 0)!)
pre.y1 = SCIGeneric(max )
pre.y2 = SCIGeneric(0)
pre.isEditable = false
pre.style.fillBrush = SCISolidBrushStyle(color: #colorLiteral(red: 0.01680417731, green: 0.1983509958, blue: 1, alpha: 0.13))
pre.style.borderPen = SCISolidPenStyle(color: .clear, withThickness: 0)
- Marcin C asked 7 years ago
- You must login to post comments
Hi Marcin,
Thanks for writing to us.
As you already know, in order to display annotation on CategoryDateTimeAxis (or any CategoryAxis) your x1\x2\y1\y2 values should be indexes (index of date values in dataSeries).
Hope that helps.
Best Regards,
Nazar R.
- Nazar Rudnyk answered 6 years ago
- You must login to post comments
Please login first to submit.