Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
a654399b
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,体验更适合开发者的 AI 搜索 >>
提交
a654399b
编写于
3月 17, 2021
作者:
O
Ovilia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test(legend): update test cases
上级
36462969
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
82 addition
and
31 deletion
+82
-31
test/legend-style.html
test/legend-style.html
+82
-31
未找到文件。
test/legend-style.html
浏览文件 @
a654399b
...
...
@@ -35,17 +35,20 @@ under the License.
<div
id=
"main1"
></div>
<div
id=
"main2"
></div>
<script>
require
([
'
echarts
'
],
function
(
echarts
)
{
var
getData
=
function
(
seriesId
)
{
function
getData
(
seriesId
)
{
var
data
=
[];
for
(
var
i
=
0
;
i
<
7
;
++
i
)
{
data
.
push
(
Math
.
random
()
*
100
+
(
seriesId
+
1
)
*
200
);
}
return
data
;
};
}
</script>
<script>
require
([
'
echarts
'
],
function
(
echarts
)
{
var
option
=
{
xAxis
:
{
type
:
'
category
'
,
...
...
@@ -54,48 +57,85 @@ under the License.
yAxis
:
{
type
:
'
value
'
},
legend
:
{
data
:
[
'
Default Line
'
,
'
Line with emptyCircle
'
,
'
Line with emptyCircle and color
'
,
'
Line with style
'
,
'
Line with visualMap
'
,
'
Pie A
'
,
'
Pie B
'
,
'
Pie C
'
]
},
legend
:
[{
data
:
[
'
Line A
'
,
'
Line B
'
,
{
name
:
'
Pie A
'
,
itemStyle
:
{
// borderWidth:
}
},
'
Pie B
'
,
'
Pie C
'
,
{
name
:
'
Line C
'
,
symbolSize
:
'
inherit
'
},
'
Line F
'
]
},
{
bottom
:
10
,
data
:
[{
name
:
'
Line D
'
},
{
name
:
'
Line E
'
,
itemStyle
:
{
color
:
'
yellow
'
}
}],
itemStyle
:
{
color
:
'
orange
'
}
}],
series
:
[{
data
:
getData
(
0
),
type
:
'
line
'
,
name
:
'
Default Line
'
name
:
'
Line A
'
},
{
data
:
getData
(
1
),
type
:
'
line
'
,
name
:
'
Line with emptyCircle
'
,
symbol
:
'
emptyCircle
'
name
:
'
Line B
'
,
itemStyle
:
{
color
:
'
red
'
,
borderWidth
:
5
},
symbolSize
:
10
},
{
data
:
getData
(
2
),
type
:
'
line
'
,
name
:
'
Line with emptyCircle and color
'
,
symbol
:
'
emptyCircle
'
,
name
:
'
Line C
'
,
lineStyle
:
{
color
:
'
green
'
,
width
:
5
,
shadowBlur
:
10
,
shadowColor
:
'
orange
'
},
itemStyle
:
{
color
:
'
auto
'
}
color
:
'
red
'
},
symbolSize
:
30
},
{
data
:
getData
(
3
),
type
:
'
line
'
,
name
:
'
Line with style
'
,
symbolSize
:
12
,
name
:
'
Line D
'
,
itemStyle
:
{
color
:
'
auto
'
,
borderColor
:
'
blue
'
,
borderWidth
:
2
,
symbolSize
:
25
},
lineStyle
:
{
color
:
'
red
'
,
width
:
4
color
:
'
blue
'
}
},
{
data
:
getData
(
4
),
type
:
'
line
'
,
name
:
'
Line with visualMap
'
,
symbolSize
:
30
,
name
:
'
Line E
'
,
itemStyle
:
{
color
:
'
green
'
},
symbolSize
:
10
},
{
data
:
getData
(
5
),
type
:
'
line
'
,
name
:
'
Line F
'
,
symbolSize
:
10
,
itemStyle
:
{
borderColor
:
'
green
'
color
:
'
blue
'
}
},
{
type
:
'
pie
'
,
...
...
@@ -112,6 +152,10 @@ under the License.
color
:
'
blue
'
}
}],
itemStyle
:
{
borderWidth
:
5
,
borderColor
:
'
#fff
'
},
center
:
[
'
80%
'
,
'
50%
'
]
}],
grid
:
{
...
...
@@ -120,19 +164,26 @@ under the License.
},
visualMap
:
{
type
:
'
continuous
'
,
min
:
1
0
00
,
max
:
1
1
00
,
min
:
1
2
00
,
max
:
1
3
00
,
inRange
:
{
color
:
[
'
green
'
,
'
yellow
'
,
'
red
'
]
},
show
:
false
,
seriesIndex
:
4
}
seriesIndex
:
5
},
animation
:
0
};
var
chart
=
testHelper
.
create
(
echarts
,
'
main1
'
,
{
title
:
[
'
Legend icon being more intuitive
'
'
**Legend icon being more intuitive**
'
,
'
Line A: the style of the line and items should be the same in those in legend; all colored in the first theme color
'
,
'
Line B: the style of the line and items should be the same in those in legend; all colored in red
'
,
'
Line C: the style of the line and items should be the same in those in legend; items colored in red and line colored in green
'
,
'
Line D: the style of the line should be the same in that in the legend; items colored orange in legend and blue in series
'
,
'
Line E: the style of the line should be the same in that in the legend; items colored yellow in legend and green in series
'
,
'
Line F: the colors in the legend should be blue
'
],
option
:
option
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录