siverlight中YValue怎么保留3位小数

继续泛泛 2011-11-04 10:11:59

DataPoint dataPoint = new DataPoint();
dataPoint.AxisXLabel = "语文";
dataPoint.YValue = 0.333;
dataSeries[i].DataPoints.Add(dataPoint);

YValue最终在数据列中显示的是0.33
怎么保留YValue的3位小数
...全文
76 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
继续泛泛 2011-11-30
  • 打赏
  • 举报
回复
jv9 2011-11-06
  • 打赏
  • 举报
回复
曾经写过一篇相关教程,请参考:

Silverlight 4常用StringFormat格式总结

http://silverlightchina.net/html/tips/2011/0424/7149.html
yijunwanghaha1 2011-11-04
  • 打赏
  • 举报
回复
substring()
kakaniuren 2011-11-04
  • 打赏
  • 举报
回复
dataPoint.YValue =String.Format("{0:N2}", 0.333);

8,734

社区成员

发帖
与我相关
我的任务
社区描述
WPF/Silverlight相关讨论
社区管理员
  • WPF/Silverlight社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧