我正在使用一些OxyPlot图形进行应用程序。

我想制作一个在LineSeries Graph上具有垂直线的图形,如下所示:

http://theclosetentrepreneur.com/how-to-add-a-vertical-line-to-an-excel-xy-chart

(我的理想图像是“格式化图表的提示...”。)

如何制作这张图?

最佳答案

您可以为此使用LineAnnotation。例如,

var annotation = new LineAnnotation();
annotation.Color = OxyColors.Blue;
annotation.MinimumY = 10;
annotation.MaximumY = 40;
annotation.X = 5;
annotation.LineStyle = LineStyle.Solid;
annotation.Type = LineAnnotationType.Vertical;
MyPlotModel.Annotations.Add(annotation);


样本输出

c# - 我可以在LineSeries图上绘制垂直线吗?-LMLPHP

关于c# - 我可以在LineSeries图上绘制垂直线吗?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/55565523/

10-10 23:31