SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0 votes
2k views

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 2 years ago
  • last active 1 year ago
0 votes
5k views

Hello,
I have a chart with four y-axes(4 Charts in one, YAxisId’s are Ch0,Ch1,Ch2,Ch3) and want to create a Boxannotaion which range over all four charts.
How can I specify a BoxAnnotation for more than one YAxisId?
And how can i change the X;Y-Values of the box programmatically?(Example: I press a button and the box should move xx positions on the X-Axes).

Showing 2 results
This template supports the sidebar's widgets. Add one or use Full Width layout.