简体   繁体   中英

C# OxyPlot: How to display point values on chart?

can anyone suggest how to display the values of the points on the chart? something like that. Chart:

图表

Use the LabelFormatString property on your series. This lets you specify what to display, and how to display it.

To display just the y values like in your screenshot:

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

y值

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

(x,y) 图片

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM