glacier
      今天在winform下使用ZedGraph绘制统计图形,绘制饼形图时,想让数据和百分比都显示在统计图形上,网上搜索看设置哪个属性可实现此功能,未果。后来自己找到,设置添加的每个PieItem的LabelType属性即可。
      枚举LabelType定义如下:
      // 摘要:
      //     Enumeration that determines the type of label that is displayed for each
      //     pie slice (see ZedGraph.PieItem.LabelType).
      public enum PieLabelType
      {
          // 摘要:
          //     Displays ZedGraph.CurveItem.Label and ZedGraph.PieItem.Value for a slice
          //     in a Pie Chart.
          Name_Value = 0,
          //
          // 摘要:
          //     Displays ZedGraph.CurveItem.Label and ZedGraph.PieItem.Value (as % of total)
          //     for a slice in a Pie Chart.
          Name_Percent = 1,
          //
          // 摘要:
          //     Displays a ZedGraph.CurveItem.Label containing the ZedGraph.PieItem.Value
          //     both as an absolute number and as percentage of the total.
          Name_Value_Percent = 2,
          //
          // 摘要:
          //     Displays ZedGraph.PieItem.Value for a slice in a Pie Chart.
          Value = 3,
          //
          // 摘要:
          //     Displays ZedGraph.PieItem.Value (as % of total) for a slice in a Pie Chart.
          Percent = 4,
          //
          // 摘要:
          //     Displays ZedGraph.CurveItem.Label for a slice in a Pie Chart.
          Name = 5,
          //
          // 摘要:
          //     No label displayed.
          None = 6,
      }

      以飨后人!

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-01-29
  • 2021-05-31
  • 2021-12-04
  • 2021-12-13
  • 2021-09-06
  • 2022-01-16
  • 2021-03-27
猜你喜欢
  • 2022-02-05
  • 2021-06-21
  • 2022-02-01
  • 2021-11-17
  • 2022-01-21
  • 2021-11-27
  • 2021-05-28
相关资源
相似解决方案