Hello,
I need to draw a lot of annotations. Those are pretty simple figures/icons. The gotchas:
- The axis (ticks/labels) should be inside of the chart area.
- The annotation should be drawn on the border of the axis/chart.
I started to use the immediate mode for this. Was pretty happy to see there are Layers in the render context and I thought I could schedule or manipulate the rendereings when it comes to what I want. Unfotunately it is immutable.
The first thing I could come over by manipulating the template at runtime although I do not want to re-template it in fear of bigger template changes than the change of Grid.Row
at runtime.
The second part is more tricky now. I would like to have fine grained control over the ordering of what is drawn. At least above/below the RenderableSeries but best to select the layers as wanted.
One big deal I did overcome is some mouse hover action for the drawn annotations.
So my idea now would be to add custom rendering layers like the HighQualityRenderSurface
but I have no Idea how this impacts the performance. I already have a target of ~30 charts. Fortunately visible ones would be only around 8 so I could manipualte the visibility on scroll to prevent render.
I attached an example of the idea.
What I tried before was interfering with The ISciChartRenderer
to wrap a before and after render. The problem is the Services
are registered and the value is asigned to a property so that my re-register (swap) has no effect. Finally I got it working using a IAnnotationsDrawingProvider
wrapper.
You can find the related post on StackOverflow:
https://stackoverflow.com/questions/78436617/immediate-mode-scichart-rendering-with-ordering-and-axis-positioning-custom-fas
EDIT:
For the fine grained control over the rendering order I managed to use the Layers
just need to do it before any counterpart manages to schedule an action (ISciChartRenderer
worked just the base class private variable assignment is nasty).
- [email protected] asked 6 months ago
- last edited 6 months ago
-
Hi Blazej, Thanks for your inquiry. I am going to discuss it with our team and will get back to you as soon as I have an update. With best regards, Lex S., MSEE, SciChart Technical Support Engineer
- You must login to post comments
Hi Blazej,
We discussed your inquiry.
Please see our recently published “ChartWidthSynchronization” custom example. We have shown here how to place Axis Ticks and Tick Labels inside the SciChartSurface.
Here is a link:
SciChart.Wpf.Examples/Sandbox/CustomerExamples/ChartsWidthSync at SciChart_v8_Dev · ABTSoftware/SciChart.Wpf.Examples · GitHub
Regarding Annotations, unfortunately, it’s not clear enough if there are still any unresolved issues. Could you please clarify?
Thanks in advance,
Lex S., MSEE
SciChart Technical Support Engineer
- Lex answered 5 months ago
- You must login to post comments
Hello,
Thanks for the example I will check it out in depth but in general it looks like its what I wanted (just at a glance).
The other problems I am facing:
- Fine grained control to apply custom drawing as wanted is achieved by using reflection and wrapping the SciChart rendering and making a callback of actions Before/After of the original
ISciChartRenderer
. I would like to have the possiblity to hook up to the rendering without using reflection. - Space for drawing custom markers. Normally the whole chart is drawn inside thechart area. I would like to have some offset to the viewport so I could draw my custom icons/marker outside of the chart but still use the
ImmediateMode
rendering. For example I would like to draw a custom marker below the chart edge (The A in the red square).
Thanks for any insights on how to achieve this.
- [email protected] answered 5 months ago
- last edited 4 months ago
- You must login to post comments
Please login first to submit.