从onlinedocument上搞下来的做个保持
[C#]
Chart.DefaultSeries.DefaultElement.SmartLabel.Text = "<%YValue,Currency>";
[Visual Basic]
Chart.DefaultSeries.DefaultElement.SmartLabel.Text = "<%YValue,Currency>"

This will format the labels on the chartArea as currency but not in other places like the legend box.

For a complete list of possible tokens see: Tokens

For a reference of how to access different label on a chart see Using Labels


Advanced Axis Formatting

The axis also provides some additional settings that influence the axis format.

Percent
Setting Axis.Percent = true will format axis tick labels as percentages (in addition to snapping the scales maximum value to 100%)

Decimal Places

A shortcut for setting the number of decimals for axis formats is to specify it with the Axis.NumberPrecision property.

dotnetcharting Axis Formatting Format strings that specify decimal spaces override this setting.
[C#]

Chart.YAxis.NumberPrecision = 2;
[Visual Basic]

Chart.YAxis.NumberPrecision = 2

相关文章:

  • 2021-05-28
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
  • 2021-05-04
  • 2021-11-13
  • 2021-11-26
  • 2021-06-07
猜你喜欢
  • 2022-12-23
  • 2021-12-13
  • 2021-08-05
  • 2021-07-31
  • 2022-12-23
  • 2021-03-31
  • 2021-07-16
相关资源
相似解决方案