Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
2e2a1f3e
I
incubator-echarts
项目概览
x649585723
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
incubator-echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2e2a1f3e
编写于
10月 30, 2013
作者:
L
lang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/ecomfe/echarts
上级
a5323d47
d6e4c13f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
49 addition
and
3 deletion
+49
-3
src/component/legend.js
src/component/legend.js
+48
-2
src/config.js
src/config.js
+1
-1
未找到文件。
src/component/legend.js
浏览文件 @
2e2a1f3e
...
...
@@ -370,13 +370,16 @@ define(function (require) {
||
series
[
i
].
type
==
ecConfig
.
CHART_TYPE_RADAR
||
series
[
i
].
type
==
ecConfig
.
CHART_TYPE_CHORD
)
{
// 饼图得查找里面的数据名字
// 饼图
、雷达图、和弦图
得查找里面的数据名字
hasFind
=
false
;
data
=
series
[
i
].
data
;
for
(
var
j
=
0
,
k
=
data
.
length
;
j
<
k
;
j
++
)
{
if
(
data
[
j
].
name
==
name
)
{
data
=
data
[
j
];
data
.
type
=
series
[
i
].
type
;
data
.
type
=
series
[
i
].
type
==
ecConfig
.
CHART_TYPE_CHORD
?
ecConfig
.
CHART_TYPE_PIE
// 和弦图复用pie图样式
:
series
[
i
].
type
;
hasFind
=
true
;
break
;
}
...
...
@@ -640,6 +643,49 @@ define(function (require) {
endAngle
:
135
});
},
chord
:
function
(
ctx
,
style
)
{
var
x
=
style
.
x
;
var
y
=
style
.
y
;
var
width
=
style
.
width
;
var
height
=
style
.
height
;
var
beziercurve
=
require
(
'
zrender/shape
'
).
get
(
'
beziercurve
'
);
ctx
.
moveTo
(
x
,
y
+
height
);
beziercurve
.
buildPath
(
ctx
,
{
xStart
:
x
,
yStart
:
y
+
height
,
cpX1
:
x
+
width
,
cpY1
:
y
+
height
,
cpX2
:
x
,
cpY2
:
y
+
4
,
xEnd
:
x
+
width
,
yEnd
:
y
+
4
,
});
ctx
.
lineTo
(
x
+
width
,
y
);
beziercurve
.
buildPath
(
ctx
,
{
xStart
:
x
+
width
,
yStart
:
y
,
cpX1
:
x
,
cpY1
:
y
,
cpX2
:
x
+
width
,
cpY2
:
y
+
height
-
4
,
xEnd
:
x
,
yEnd
:
y
+
height
-
4
,
});
ctx
.
lineTo
(
x
,
y
+
height
);
/*
var x = style.x + 2;
var y = style.y;
var width = style.width - 2;
var height = style.height;
var r = width / Math.sqrt(3);
ctx.moveTo(x, y);
ctx.quadraticCurveTo(x + width / 4 * 3, y, x + width, y + height);
ctx.arc(
x + width / 2, y + height + r / 2,
r, -Math.PI / 6, -Math.PI / 6 * 5, true);
ctx.quadraticCurveTo(x - width / 2, y + height / 3, x, y);
*/
},
k
:
function
(
ctx
,
style
)
{
var
x
=
style
.
x
;
var
y
=
style
.
y
;
...
...
src/config.js
浏览文件 @
2e2a1f3e
...
...
@@ -671,7 +671,7 @@ define(function() {
sortSub
:
'
none
'
,
// can be 'none', 'ascending', 'descending'
startAngle
:
90
,
clockWise
:
false
,
showScale
:
tru
e
,
showScale
:
fals
e
,
showScaleText
:
true
,
itemStyle
:
{
normal
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录