Esempio n. 1
0
 private void ChangeToDoughnut()
 {
     if (ChartType != PieChartType.Doughnut)
     {
         ChartType = PieChartType.Doughnut;
     }
 }
Esempio n. 2
0
 private void ChangeToPie()
 {
     if (ChartType != PieChartType.Pie)
     {
         ChartType = PieChartType.Pie;
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Create a pie chart of specified type
 /// </summary>
 /// <param name="width">width in pixels</param>
 /// <param name="height">height in pixels</param>
 /// <param name="pieChartType"></param>
 public PieChart(int width, int height, PieChartType pieChartType)
     : base(width, height)
 {
     this.pieChartType = pieChartType;
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the Pie Chart generator.
 /// </summary>
 /// <param name="type">Pie chart type.</param>
 /// <param name="size">Size of the chart.</param>
 /// <param name="data">Chart data.</param>
 /// <param name="labels">Labels for pies</param>
 public PieChart(PieChartType type, ChartSize size, ChartData data, PieChartLabels labels)
     : this(type, size, data)
 {
     _labels = labels;
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the Pie Chart generator.
 /// </summary>
 /// <param name="type">Pie chart type.</param>
 /// <param name="size">Size of the chart.</param>
 /// <param name="data">Chart data.</param>
 public PieChart(PieChartType type, ChartSize size, ChartData data)
     : base(GetPieType(type), size, data)
 {
 }
Esempio n. 6
0
 private static ChartType GetPieType(PieChartType type)
 {
     switch(type)
     {
         case PieChartType.Pie2D:
             return PieChart2D;
         case PieChartType.Pie3D:
             return PieChart3D;
         default:
             throw new ArgumentOutOfRangeException("type");
     }
 }
Esempio n. 7
0
 public PieChartBuilder Type(PieChartType value)
 {
     base.Options["type"] = value;
     return(this);
 }
Esempio n. 8
0
 /// <summary>
 /// 创建一个指定类型的饼图
 /// </summary>
 /// <param name="width">width in pixels</param>
 /// <param name="height">height in pixels</param>
 /// <param name="pieChartType"></param>
 public PieChart(int width, int heigth, PieChartType pieChartType)
     : base(width, heigth)
 {
     this.pieChartType = pieChartType;
 }