C# 如何在线型打印上显示文字?
我试图将点的值打印到绘图上,但提供的文档不完整或令人困惑。我知道TrackPerformatString值可以做类似的事情,但我希望文本始终位于随不同值动态变化的绘图上。有什么我可能忽略了或者我可以研究的吗C# 如何在线型打印上显示文字?,c#,oxyplot,C#,Oxyplot,我试图将点的值打印到绘图上,但提供的文档不完整或令人困惑。我知道TrackPerformatString值可以做类似的事情,但我希望文本始终位于随不同值动态变化的绘图上。有什么我可能忽略了或者我可以研究的吗 var series1 = new LineSeries { Title = "Stage I", MarkerType = MarkerType.Circle, Smooth = true, TrackerFormatString = "Stage I\nYear: {2:0.0}\n{4
var series1 = new LineSeries { Title = "Stage I", MarkerType = MarkerType.Circle, Smooth = true, TrackerFormatString = "Stage I\nYear: {2:0.0}\n{4:0.0} %" };
//let's say I have a line series like this
//I need to enter some sort of text on the plot that has the values of the below points:
series1.Points.Add(new DataPoint(0.0, 100.0));
series1.Points.Add(new DataPoint(1, 82.3));
series1.Points.Add(new DataPoint(3, 59.2));
series1.Points.Add(new DataPoint(5, 47.7));
对此,任何形式的帮助都将不胜感激 您可以向绘图中添加注释。要显示文本,请使用
TextAnnotation
将注释添加到模型中,为位置提供数据点
,为要显示的文本提供文本
。比如说
yourModel.Annotations.Add(new TextAnnotation { TextPosition = new DataPoint(DateTimeAxis.ToDouble(now), wert), Text = "82.3%" });
那么,您想添加注释吗?