Commit 174488f4 HZH

饼状图增加圆心

1 个父辈 cb824a9d
......@@ -415,7 +415,7 @@ namespace HZH_Controls.Controls
if (centerOfCircleWidth > 0)
{
Rectangle rectCenter = new Rectangle(rect.Left + rect.Width / 2 - centerOfCircleWidth / 2, rect.Top + rect.Height / 2 - centerOfCircleWidth / 2, centerOfCircleWidth, centerOfCircleWidth);
Rectangle rectCenter = new Rectangle(rectangle.Left + rectangle.Width / 2 - centerOfCircleWidth / 2, rectangle.Top + rectangle.Height / 2 - centerOfCircleWidth / 2, centerOfCircleWidth, centerOfCircleWidth);
e.Graphics.FillEllipse(new SolidBrush(centerOfCircleColor), rectCenter);
}
}
......
......@@ -38,8 +38,20 @@
HZH_Controls.Controls.PieItem pieItem8 = new HZH_Controls.Controls.PieItem();
HZH_Controls.Controls.PieItem pieItem9 = new HZH_Controls.Controls.PieItem();
HZH_Controls.Controls.PieItem pieItem10 = new HZH_Controls.Controls.PieItem();
HZH_Controls.Controls.PieItem pieItem11 = new HZH_Controls.Controls.PieItem();
HZH_Controls.Controls.PieItem pieItem12 = new HZH_Controls.Controls.PieItem();
HZH_Controls.Controls.PieItem pieItem13 = new HZH_Controls.Controls.PieItem();
HZH_Controls.Controls.PieItem pieItem14 = new HZH_Controls.Controls.PieItem();
HZH_Controls.Controls.PieItem pieItem15 = new HZH_Controls.Controls.PieItem();
HZH_Controls.Controls.PieItem pieItem16 = new HZH_Controls.Controls.PieItem();
HZH_Controls.Controls.PieItem pieItem17 = new HZH_Controls.Controls.PieItem();
HZH_Controls.Controls.PieItem pieItem18 = new HZH_Controls.Controls.PieItem();
HZH_Controls.Controls.PieItem pieItem19 = new HZH_Controls.Controls.PieItem();
HZH_Controls.Controls.PieItem pieItem20 = new HZH_Controls.Controls.PieItem();
this.ucPieChart1 = new HZH_Controls.Controls.UCPieChart();
this.ucPieChart2 = new HZH_Controls.Controls.UCPieChart();
this.ucPieChart3 = new HZH_Controls.Controls.UCPieChart();
this.ucPieChart4 = new HZH_Controls.Controls.UCPieChart();
this.SuspendLayout();
//
// ucPieChart1
......@@ -103,22 +115,93 @@
pieItem8,
pieItem9,
pieItem10};
this.ucPieChart2.Location = new System.Drawing.Point(415, 20);
this.ucPieChart2.Location = new System.Drawing.Point(415, 18);
this.ucPieChart2.Name = "ucPieChart2";
this.ucPieChart2.Size = new System.Drawing.Size(395, 349);
this.ucPieChart2.Size = new System.Drawing.Size(342, 351);
this.ucPieChart2.TabIndex = 0;
this.ucPieChart2.TiTle = "有标题的饼状图";
this.ucPieChart2.TitleFont = new System.Drawing.Font("微软雅黑", 12F);
this.ucPieChart2.TitleFroeColor = System.Drawing.Color.Black;
//
// ucPieChart3
//
this.ucPieChart3.BackColor = System.Drawing.Color.Transparent;
this.ucPieChart3.CenterOfCircleColor = System.Drawing.Color.White;
this.ucPieChart3.CenterOfCircleWidth = 150;
pieItem11.Name = "Source1";
pieItem11.PieColor = null;
pieItem11.Value = 27;
pieItem12.Name = "Source2";
pieItem12.PieColor = null;
pieItem12.Value = 20;
pieItem13.Name = "Source3";
pieItem13.PieColor = null;
pieItem13.Value = 94;
pieItem14.Name = "Source4";
pieItem14.PieColor = null;
pieItem14.Value = 28;
pieItem15.Name = "Source5";
pieItem15.PieColor = null;
pieItem15.Value = 84;
this.ucPieChart3.DataSource = new HZH_Controls.Controls.PieItem[] {
pieItem11,
pieItem12,
pieItem13,
pieItem14,
pieItem15};
this.ucPieChart3.Location = new System.Drawing.Point(415, 393);
this.ucPieChart3.Name = "ucPieChart3";
this.ucPieChart3.Size = new System.Drawing.Size(342, 351);
this.ucPieChart3.TabIndex = 0;
this.ucPieChart3.TiTle = "有标题的饼状图";
this.ucPieChart3.TitleFont = new System.Drawing.Font("微软雅黑", 12F);
this.ucPieChart3.TitleFroeColor = System.Drawing.Color.Black;
//
// ucPieChart4
//
this.ucPieChart4.BackColor = System.Drawing.Color.Transparent;
this.ucPieChart4.CenterOfCircleColor = System.Drawing.Color.White;
this.ucPieChart4.CenterOfCircleWidth = 150;
pieItem16.Name = "Source1";
pieItem16.PieColor = null;
pieItem16.Value = 27;
pieItem17.Name = "Source2";
pieItem17.PieColor = null;
pieItem17.Value = 20;
pieItem18.Name = "Source3";
pieItem18.PieColor = null;
pieItem18.Value = 94;
pieItem19.Name = "Source4";
pieItem19.PieColor = null;
pieItem19.Value = 28;
pieItem20.Name = "Source5";
pieItem20.PieColor = null;
pieItem20.Value = 84;
this.ucPieChart4.DataSource = new HZH_Controls.Controls.PieItem[] {
pieItem16,
pieItem17,
pieItem18,
pieItem19,
pieItem20};
this.ucPieChart4.IsRenderPercent = true;
this.ucPieChart4.Location = new System.Drawing.Point(50, 424);
this.ucPieChart4.Name = "ucPieChart4";
this.ucPieChart4.Size = new System.Drawing.Size(342, 320);
this.ucPieChart4.TabIndex = 1;
this.ucPieChart4.TiTle = null;
this.ucPieChart4.TitleFont = new System.Drawing.Font("微软雅黑", 12F);
this.ucPieChart4.TitleFroeColor = System.Drawing.Color.Black;
//
// UCTestPieCharts
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.ucPieChart4);
this.Controls.Add(this.ucPieChart1);
this.Controls.Add(this.ucPieChart3);
this.Controls.Add(this.ucPieChart2);
this.Name = "UCTestPieCharts";
this.Size = new System.Drawing.Size(813, 493);
this.Size = new System.Drawing.Size(813, 766);
this.Load += new System.EventHandler(this.UCTestPieCharts_Load);
this.ResumeLayout(false);
......@@ -128,5 +211,7 @@
private HZH_Controls.Controls.UCPieChart ucPieChart2;
private HZH_Controls.Controls.UCPieChart ucPieChart1;
private HZH_Controls.Controls.UCPieChart ucPieChart3;
private HZH_Controls.Controls.UCPieChart ucPieChart4;
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!