Pre loader

Order of annotations and renderable series


Good day!
I’m working with FastLineRenderableSeries and big amount of annotations. I need to put some annotations below LineSeries, but above other annotaions.
I’ve read article about order of annotaions and renderable series and using of stack, but it doesn’t make a sense.
Thank in advance.
Here are sreenshots.

  • You must to post comments

Hi Egor,

The SciChartSurface is custom control, which is templated in XAML and has many layers. In brief, the layers include:

  1. GridLinesPanel
  2. Annotation Canvas (Below Series)
  3. RenderSurface (Hosts an Image control where Renderable series are drawn)
  4. Annotation Canvas (Above Series)
  5. ChartModifierSurface Canvas, where Rollover markers, RubberBand rectangles are drawn

It is important to note that while RenderableSeries all exist on the same layer (the RenderSurface), the z-order of RenderableSeries is determined like this.

Given three RenderableSeries, a, b, c

  • RenderableSeries[0] – ZIndex 0
  • RenderableSeries[1] – ZIndex 1
  • RenderableSeries[2] – ZIndex 2

However, setting the RenderableSeries.IsSelected property can re-order the Z-Index, bringing for instance:

  • RenderableSeries[1] – ZIndex 1
  • RenderableSeries[2] – ZIndex 2
  • RenderableSeries[0] with IsSelected = true – ZIndex 3

Does that answer your question?

Best regards,

  • Egor
    Thank you for your answer! I've known about this before. I've put these green line annotations below chart (figure above), but it is not good for me, because I need to have interactions with these annotation (left mouse button down, right mouse button down and etc.) How can I save interactions in this method?
  • Andrew Burnett-Thompson
    Hmm ... not easy to do. By definition, being below the line series, the RenderSurface intercepts mouse events before the annotation. It would have to be a hack to try to work around it, and I'm not sure what ...
  • You must to post comments

Hi Egor,

The reason for this is that mouse events are handled by some control lying over the underneath annotations canvas, probably by the render surface. So you could try setting IsHitTestVisible to “False” on it: ((RenderSurfaceBase)sciChart.RenderSurface).IsHitTestVisible = false . Make sure you do this after the surface was loaded, e.g. a Loaded event handler could be a suitable place.

  • Egor
    Thank you for your advice. I'll try this method later.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies