Is there a way to render a Point outside of the Plot? (WPF)

Hugo 2 jaar geleden bijgewerkt 2 jaar geleden 1

I've created a custom legend and this is more or less the final piece of the puzzle.

Each line is:

[checkbox for series visibility] [*Need to add point shape here*] [Series title] [A custom control that displays data about the data] [row of of Buttons]

Each line creates a series and passes it to the plot, so I already have all the Marker parameters.

I've spent a day going through the example browser trying to dig down to how the points are actually rendered, but I could use some direction. Or, am I going to have to recreate the shapes in XAML?

Well I feel like an idiot. It's real easy. Here's how to do it if anyone else has the same requirement:


<Canvas Name="PointCanvas" Width="50" Height="50"/>


OxyPlot.Wpf.CanvasRenderContext rc = new OxyPlot.Wpf.CanvasRenderContext(PointCanvas);
rc.DrawMarker(new OxyRect(0,0,50,50), new ScreenPoint(8, 8), MarkerType.Diamond,new List<ScreenPoint>(), 5, OxyColors.Black, OxyColors.Green, 1);