Adding an element to a PlotModel

Mar 5, 2013 at 2:17 PM
Hello,

Is it possible to add custom elements to a PlotModel?
For instance, I would like to build a second Legend to a plot (it is not an annotation, since it should be fixed in the top corner, when I zoom or move the plot). This second legend could be a StackPanel, or a OxyRect, or a Grid maybe.

Thank you.
Bruno
Coordinator
Mar 13, 2013 at 8:29 PM
It should be possible to use an annotation for the second legend. Derive from Annotation and override the Render method. You don't need to transform the rendered content by the axes, just use the PlotModel.PlotArea property to find the coordinates. Note that annotations are not part of the measure/arrange methods for the 'plot area', so you need to set the plot margins manually if you want to place the second legend outside the plot area.
Jul 26, 2014 at 10:57 AM
But, in WPF, how i do [Derive from Annotation and override the Render method]?