Wpf OxyPlot图例项管理

Wpf OxyPlot图例项管理,wpf,oxyplot,Wpf,Oxyplot,有没有办法管理图例中的项目?我的意思是e.q.从图例中删除一些项目,但不是从整个情节中删除?我知道绘图中的每个系列都与图例中的一个项目链接,但我想打破这一规则,只将选定的系列放在图例中 感谢您的请求。如果您没有为该系列(lineseries等)指定标题,它将不会显示在图例上: plotModel = new PlotModel(); plotModel.LegendTitle = "Legend"; plotModel.LegendPosition = LegendPosition.RightB

有没有办法管理图例中的项目?我的意思是e.q.从图例中删除一些项目,但不是从整个情节中删除?我知道绘图中的每个系列都与图例中的一个项目链接,但我想打破这一规则,只将选定的系列放在图例中


感谢您的请求。

如果您没有为该系列(lineseries等)指定标题,它将不会显示在图例上:

plotModel = new PlotModel();
plotModel.LegendTitle = "Legend";
plotModel.LegendPosition = LegendPosition.RightBottom;

plotModel.Series.Add(new LineSeries
{
    ItemsSource = someItemSource,
    Color = OxyColors.Red,
    //Title = "title" <- Title commented
});
plotModel=新的plotModel();
plotModel.LegendTitle=“图例”;
plotModel.LegendPosition=LegendPosition.RightBottom;
plotModel.Series.Add(新的线系列
{
ItemsSource=someItemSource,
颜色=氧色。红色,

//Title=“Title”如果您没有为该系列(lineseries等)指定标题,它就不会出现在图例上。啊,这是个好主意!非常感谢,我会尝试一下。是的,谢谢,它解决了我的问题。