Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e4f7ce16
由
HZH
编写于
2019-09-25 15:10:09 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
雷达图增加圆分隔
1 个父辈
0813ed10
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
46 行增加
和
17 行删除
HZH_Controls/HZH_Controls/Controls/Charts/RadarChart/UCRadarChart.cs
HZH_Controls/Test/UC/UCTestRadarChart.Designer.cs
HZH_Controls/HZH_Controls/Controls/Charts/RadarChart/UCRadarChart.cs
查看文件 @
e4f7ce1
...
...
@@ -51,6 +51,10 @@ namespace HZH_Controls.Controls
Invalidate
();
}
}
[
Browsable
(
true
)]
[
Category
(
"自定义"
)]
[
Description
(
"获取或设置是否使用圆代替连线进行分隔"
)]
public
bool
UseRoundSplit
{
get
;
set
;
}
/// <summary>
/// The split odd color
...
...
@@ -86,7 +90,11 @@ namespace HZH_Controls.Controls
public
Color
SplitEvenColor
{
get
{
return
splitEvenColor
;
}
set
{
splitEvenColor
=
value
;
}
set
{
splitEvenColor
=
value
;
Invalidate
();
}
}
/// <summary>
...
...
@@ -218,6 +226,7 @@ namespace HZH_Controls.Controls
}
/// <summary>
/// The title size
/// </summary>
...
...
@@ -414,7 +423,7 @@ namespace HZH_Controls.Controls
for
(
int
j
=
0
;
j
<
intCount
;
j
++)
{
g
.
FillRectangle
(
new
SolidBrush
(
lines
[
i
*
intLineValueComCount
+
j
].
LineColor
.
Value
),
new
RectangleF
(
x
+
(
lineValueTypeSize
.
Width
+
25
)
*
j
,
y
+
lineValueTypeSize
.
Height
*
i
,
15
,
lineValueTypeSize
.
Height
));
g
.
FillRectangle
(
new
SolidBrush
(
lines
[
i
*
intLineValueComCount
+
j
].
LineColor
.
Value
),
new
RectangleF
(
x
+
(
lineValueTypeSize
.
Width
+
25
)
*
j
,
y
+
lineValueTypeSize
.
Height
*
i
,
15
,
lineValueTypeSize
.
Height
));
g
.
DrawString
(
lines
[
i
*
intLineValueComCount
+
j
].
Name
,
Font
,
new
SolidBrush
(
lines
[
i
*
intLineValueComCount
+
j
].
LineColor
.
Value
),
new
PointF
(
x
+
(
lineValueTypeSize
.
Width
+
25
)
*
j
+
20
,
y
+
lineValueTypeSize
.
Height
*
i
));
}
}
...
...
@@ -441,26 +450,46 @@ namespace HZH_Controls.Controls
}
}
for
(
int
i
=
0
;
i
<
lstRingPoints
.
Count
;
i
++
)
if
(
UseRoundSplit
)
{
var
ring
=
lstRingPoints
[
i
];
GraphicsPath
path
=
new
GraphicsPath
();
path
.
AddLines
(
ring
.
ToArray
());
if
((
lstRingPoints
.
Count
-
i
)
%
2
==
0
)
for
(
int
i
=
0
;
i
<
splitCount
;
i
++)
{
g
.
FillPath
(
new
SolidBrush
(
splitEvenColor
),
path
);
}
else
{
g
.
FillPath
(
new
SolidBrush
(
splitOddColor
),
path
);
RectangleF
rect
=
new
RectangleF
(
centrePoint
.
X
-
fltSplitRadiusWidth
*
(
splitCount
-
i
),
centrePoint
.
Y
-
fltSplitRadiusWidth
*
(
splitCount
-
i
),
fltSplitRadiusWidth
*
(
splitCount
-
i
)
*
2
,
fltSplitRadiusWidth
*
(
splitCount
-
i
)
*
2
);
if
(
i
%
2
==
0
)
{
g
.
FillEllipse
(
new
SolidBrush
(
splitOddColor
),
rect
);
}
else
{
g
.
FillEllipse
(
new
SolidBrush
(
splitEvenColor
),
rect
);
}
g
.
DrawEllipse
(
new
Pen
(
new
SolidBrush
(
lineColor
)),
rect
);
}
}
//画环
foreach
(
var
ring
in
lstRingPoints
)
else
{
ring
.
Add
(
ring
[
0
]);
g
.
DrawLines
(
new
Pen
(
new
SolidBrush
(
lineColor
)),
ring
.
ToArray
());
//间隔颜色
for
(
int
i
=
0
;
i
<
lstRingPoints
.
Count
;
i
++)
{
var
ring
=
lstRingPoints
[
i
];
GraphicsPath
path
=
new
GraphicsPath
();
path
.
AddLines
(
ring
.
ToArray
());
if
((
lstRingPoints
.
Count
-
i
)
%
2
==
0
)
{
g
.
FillPath
(
new
SolidBrush
(
splitEvenColor
),
path
);
}
else
{
g
.
FillPath
(
new
SolidBrush
(
splitOddColor
),
path
);
}
}
//画环
foreach
(
var
ring
in
lstRingPoints
)
{
ring
.
Add
(
ring
[
0
]);
g
.
DrawLines
(
new
Pen
(
new
SolidBrush
(
lineColor
)),
ring
.
ToArray
());
}
}
//分割线
foreach
(
var
item
in
lstRingPoints
[
0
])
...
...
HZH_Controls/Test/UC/UCTestRadarChart.Designer.cs
查看文件 @
e4f7ce1
此文件的差异被折叠,
点击展开。
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论