Mar 8, 2012 at 9:50 PM
Edited Mar 8, 2012 at 9:55 PM
I am very impressed of how easy an implementation of oxyplot is possible.
Many of my plots use a DateTime axis and I am used to change a monolor background to a background wth colored areas which represent the months for example (see the following
To implement this I created a new Annotation class "FreeAnnotation" and added two methods in order to be able to draw rectangles an text. This works fine but the annotation can only be added as "BelowSeries" oder "AboveSeries". So when drawing a rectangle
as a BelowSerie then a grid ist hidden because it is drawn before the annotation.
So I changed the drawing order in "PlotModel.Rendering.cs from
But this is not a good solution because it has to be done with each new release.
My proposal is
- to change the drawing sequence of the two layers (RenderAnnotations(rc, AnnotationLayer.BelowSeries) and RenderAxes(rc, AxisLayer.BelowSeries) or
- to add additional postitions of the annotation layer (like "BelowAxes" or "AsBackGround" or "AboveBackGround") or
- to to add something like a "zIndex" whose initial values represent the order of the respective layer but it is a value which can be changed by program.