Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
b3485c4e
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,发现更多精彩内容 >>
提交
b3485c4e
编写于
11月 01, 2017
作者:
S
sushuang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix #6932 (themeRiver legend color is incorrect)
上级
992b0a9f
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
23322 addition
and
22397 deletion
+23322
-22397
dist/echarts.js
dist/echarts.js
+23296
-22386
dist/echarts.js.map
dist/echarts.js.map
+1
-1
src/chart/themeRiver/ThemeRiverSeries.js
src/chart/themeRiver/ThemeRiverSeries.js
+1
-1
src/chart/themeRiver/ThemeRiverView.js
src/chart/themeRiver/ThemeRiverView.js
+1
-2
src/chart/themeRiver/themeRiverVisual.js
src/chart/themeRiver/themeRiverVisual.js
+17
-3
test/themeRiver.html
test/themeRiver.html
+6
-4
未找到文件。
dist/echarts.js
浏览文件 @
b3485c4e
此差异已折叠。
点击以展开。
dist/echarts.js.map
浏览文件 @
b3485c4e
此差异已折叠。
点击以展开。
src/chart/themeRiver/ThemeRiverSeries.js
浏览文件 @
b3485c4e
...
...
@@ -30,7 +30,7 @@ var ThemeRiverSeries = SeriesModel.extend({
init
:
function
(
option
)
{
ThemeRiverSeries
.
superApply
(
this
,
'
init
'
,
arguments
);
// Put this function here is for the sake of consistency of code
// Put this function here is for the sake of consistency of code
style.
// Enable legend selection for each data item
// Use a function instead of direct access because data reference may changed
this
.
legendDataProvider
=
function
()
{
...
...
src/chart/themeRiver/ThemeRiverView.js
浏览文件 @
b3485c4e
...
...
@@ -19,7 +19,6 @@ export default echarts.extendChartView({
render
:
function
(
seriesModel
,
ecModel
,
api
)
{
var
data
=
seriesModel
.
getData
();
var
rawData
=
seriesModel
.
getRawData
();
if
(
!
data
.
count
())
{
return
;
...
...
@@ -69,7 +68,7 @@ export default echarts.extendChartView({
points0
.
push
([
x
,
y0
]);
points1
.
push
([
x
,
y0
+
y
]);
color
=
rawD
ata
.
getItemVisual
(
indices
[
j
],
'
color
'
);
color
=
d
ata
.
getItemVisual
(
indices
[
j
],
'
color
'
);
}
var
polygon
;
...
...
src/chart/themeRiver/themeRiverVisual.js
浏览文件 @
b3485c4e
...
...
@@ -3,16 +3,30 @@
* @author Deqing Li(annong035@gmail.com)
*/
import
{
createHashMap
}
from
'
zrender/src/core/util
'
;
export
default
function
(
ecModel
)
{
ecModel
.
eachSeriesByType
(
'
themeRiver
'
,
function
(
seriesModel
)
{
var
data
=
seriesModel
.
getData
();
var
rawData
=
seriesModel
.
getRawData
();
var
colorList
=
seriesModel
.
get
(
'
color
'
);
var
idxMap
=
createHashMap
();
data
.
each
(
function
(
idx
)
{
idxMap
.
set
(
data
.
getRawIndex
(
idx
),
idx
);
});
data
.
each
(
function
(
i
ndex
)
{
var
name
=
data
.
getName
(
i
ndex
);
rawData
.
each
(
function
(
rawI
ndex
)
{
var
name
=
rawData
.
getName
(
rawI
ndex
);
var
color
=
colorList
[(
seriesModel
.
nameMap
.
get
(
name
)
-
1
)
%
colorList
.
length
];
rawData
.
setItemVisual
(
index
,
'
color
'
,
color
);
rawData
.
setItemVisual
(
rawIndex
,
'
color
'
,
color
);
var
idx
=
idxMap
.
get
(
rawIndex
);
if
(
idx
!=
null
)
{
data
.
setItemVisual
(
idx
,
'
color
'
,
color
);
}
});
});
}
\ No newline at end of file
test/themeRiver.html
浏览文件 @
b3485c4e
...
...
@@ -2,6 +2,7 @@
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<!-- <script src="lib/esl.js"></script> -->
<script
src=
"lib/esl.js"
></script>
<script
src=
"lib/config.js"
></script>
<script
src=
"lib/jquery.min.js"
></script>
...
...
@@ -19,10 +20,11 @@
require
([
'
echarts
'
// 'echarts/chart/themeRiver',
// 'echarts/component/legend',
// 'echarts/component/singleAxis',
// 'echarts/component/tooltip',
// 'echarts/src/echarts',
// 'echarts/src/chart/themeRiver',
// 'echarts/src/component/legend',
// 'echarts/src/component/singleAxis',
// 'echarts/src/component/tooltip',
],
function
(
echarts
)
{
var
chart
=
echarts
.
init
(
document
.
getElementById
(
'
main
'
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录