Is it possible to make a custom-drawn chart area? #51
-
Currently I have a custom heatmap-style Avalonia control which overrides the Render method to call I would like to have OxyPlot axes (and maybe even tooltips/trackers) but keep the ability to draw the plot area myself (because it involves shader effects). Is there a way to do this (or similar) with OxyPlot.Avalonia? Thanks for your time |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't think I've understood what you mean; there is an Overlay example which may or may not be useful: shows how to listen to the axes to update a component that isn't managed by OxyPlot. Another thing you could do is just grab the canvas that OxyPlot draws to and stuff whatever you want in the back of that as part of a custom annotation (so that it gets access to the usual APIs that annotations use) by passing the Overlay example: https://github.com/oxyplot/oxyplot-avalonia/blob/master/Source/Examples/Avalonia/AvaloniaExamples/Examples/OverlayDemo/MainWindow.xaml.cs In any case, this isn't really supported by the library, but happy to help bodge something. |
Beta Was this translation helpful? Give feedback.
I don't think I've understood what you mean; there is an Overlay example which may or may not be useful: shows how to listen to the axes to update a component that isn't managed by OxyPlot.
Another thing you could do is just grab the canvas that OxyPlot draws to and stuff whatever you want in the back of that as part of a custom annotation (so that it gets access to the usual APIs that annotations use) by passing the
IRenderContext
interface (i.e. use reflection to get at the innards of the concreteCanvasRenderContext
)Overlay example: https://github.com/oxyplot/oxyplot-avalonia/blob/master/Source/Examples/Avalonia/AvaloniaExamples/Examples/OverlayDemo/MainWindow.xaml.cs
CreateAndAdd
inC…