C# OxyPlot:如何在图表上显示点值?

时间:2021-04-12 11:36:36

标签: c# winforms oxyplot

谁能建议如何在图表上显示点的值?类似的东西。图表:

chart

1 个答案:

答案 0 :(得分:0)

在您的系列中使用 LabelFormatString 属性。这让您可以指定要显示的内容以及如何显示。

要仅显示屏幕截图中的 y 值:

  // Show the y value with 1 decimal place.
  series.LabelFormatString = "{1:F1}";

y value

  // Or if you wanted to show (x, y).
  series.LabelFormatString = "({0:F1}, {1:F1})";

(x,y) picture