Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
52765998
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 搜索 >>
提交
52765998
编写于
12月 01, 2019
作者:
P
pissang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(legend): update case of legend using visualMap color
上级
db22c3f1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
38 addition
and
10 deletion
+38
-10
test/legend-visualMapColor.html
test/legend-visualMapColor.html
+38
-10
未找到文件。
test/legend-visualMapColor.html
浏览文件 @
52765998
...
...
@@ -39,6 +39,7 @@ under the License.
<div
id=
"main0"
></div>
<div
id=
"main1"
></div>
<div
id=
"main2"
></div>
...
...
@@ -59,20 +60,20 @@ under the License.
[
"
01
"
,
"
高档
"
,
6
1278
,
"
6
1278
.00
"
6
789
,
"
6
789
.00
"
],
[
"
03
"
,
"
中档
"
,
108814
,
"
108814
.00
"
9546
,
"
9546
.00
"
],
[
"
04
"
,
"
低档
"
,
242664
,
"
242664
.00
"
16892
,
"
16892
.00
"
]
]
}
...
...
@@ -139,16 +140,13 @@ under the License.
backgroundColor
:
'
#2c343c
'
,
legend
:
{
data
:
data
.
map
(
function
(
item
)
{
return
item
.
name
}),
textStyle
:
{
color
:
'
#fff
'
}
},
visualMap
:
{
show
:
false
,
min
:
8
0
,
min
:
20
0
,
max
:
600
,
inRange
:
{
colorLightness
:
[
0
,
1
]
...
...
@@ -204,6 +202,36 @@ under the License.
});
});
</script>
<script>
require
([
'
echarts
'
/*, 'map/js/china' */
],
function
(
echarts
)
{
var
option
=
{
legend
:
{
},
series
:
{
type
:
'
pie
'
,
itemStyle
:
{
color
:
function
(
params
)
{
var
colorList
=
[
'
#ff3322
'
,
'
#232211
'
,
'
#aabbcc
'
];
return
colorList
[
params
.
dataIndex
];
}
},
data
:
[
{
name
:
'
First
'
,
value
:
1222
},
{
name
:
'
Second
'
,
value
:
2333
},
{
name
:
'
Third
'
,
value
:
3444
},
]
}
};
var
chart
=
testHelper
.
create
(
echarts
,
'
main2
'
,
{
title
:
[
'
Legend use color from callback
'
],
option
:
option
});
});
</script>
</body>
</html>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录