Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
半栈学徒
incubator-echarts
提交
66f88dda
I
incubator-echarts
项目概览
半栈学徒
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
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,发现更多精彩内容 >>
提交
66f88dda
编写于
4月 23, 2018
作者:
S
sushuang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tweak cases and code check.
上级
157e9610
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
118 addition
and
126 deletion
+118
-126
.jshintrc-dist
.jshintrc-dist
+1
-1
src/component/toolbox/feature/DataZoom.js
src/component/toolbox/feature/DataZoom.js
+2
-0
src/stream/Scheduler.js
src/stream/Scheduler.js
+1
-1
src/util/format.js
src/util/format.js
+3
-3
test/custom-bmap-polygon.html
test/custom-bmap-polygon.html
+1
-1
test/custom-children-remove.html
test/custom-children-remove.html
+89
-104
test/dataZoom-rainfall-inside.html
test/dataZoom-rainfall-inside.html
+1
-1
test/graphicRemove.html
test/graphicRemove.html
+20
-15
未找到文件。
.jshintrc-dist
浏览文件 @
66f88dda
{
{
"bitwise": false,
"bitwise": false,
"camelcase":
tru
e,
"camelcase":
fals
e,
"curly": true,
"curly": true,
"eqeqeq": false,
"eqeqeq": false,
"forin": false,
"forin": false,
...
...
src/component/toolbox/feature/DataZoom.js
浏览文件 @
66f88dda
...
@@ -251,6 +251,8 @@ echarts.registerPreprocessor(function (option) {
...
@@ -251,6 +251,8 @@ echarts.registerPreprocessor(function (option) {
if
(
toolboxOpt
&&
toolboxOpt
.
feature
)
{
if
(
toolboxOpt
&&
toolboxOpt
.
feature
)
{
var
dataZoomOpt
=
toolboxOpt
.
feature
.
dataZoom
;
var
dataZoomOpt
=
toolboxOpt
.
feature
.
dataZoom
;
// FIXME: If add dataZoom when setOption in merge mode,
// no axis info to be added. See `test/dataZoom-extreme.html`
addForAxis
(
'
xAxis
'
,
dataZoomOpt
);
addForAxis
(
'
xAxis
'
,
dataZoomOpt
);
addForAxis
(
'
yAxis
'
,
dataZoomOpt
);
addForAxis
(
'
yAxis
'
,
dataZoomOpt
);
}
}
...
...
src/stream/Scheduler.js
浏览文件 @
66f88dda
...
@@ -466,7 +466,7 @@ function makeSeriesTaskProgress(resetDefineIdx) {
...
@@ -466,7 +466,7 @@ function makeSeriesTaskProgress(resetDefineIdx) {
else
if
(
resetDefine
&&
resetDefine
.
progress
)
{
else
if
(
resetDefine
&&
resetDefine
.
progress
)
{
resetDefine
.
progress
(
params
,
data
);
resetDefine
.
progress
(
params
,
data
);
}
}
}
}
;
}
}
function
seriesTaskCount
(
context
)
{
function
seriesTaskCount
(
context
)
{
...
...
src/util/format.js
浏览文件 @
66f88dda
...
@@ -42,14 +42,14 @@ var replaceMap = {
...
@@ -42,14 +42,14 @@ var replaceMap = {
'
<
'
:
'
<
'
,
'
<
'
:
'
<
'
,
'
>
'
:
'
>
'
,
'
>
'
:
'
>
'
,
'
"
'
:
'
"
'
,
'
"
'
:
'
"
'
,
'
\'
'
:
'
'
'
,
'
\'
'
:
'
'
'
};
};
export
function
encodeHTML
(
source
)
{
export
function
encodeHTML
(
source
)
{
return
source
==
null
return
source
==
null
?
''
?
''
:
(
source
+
''
).
replace
(
replaceReg
,
function
(
str
,
c
har
)
{
:
(
source
+
''
).
replace
(
replaceReg
,
function
(
str
,
c
)
{
return
replaceMap
[
c
har
];
return
replaceMap
[
c
];
});
});
}
}
...
...
test/custom-bmap-polygon.html
浏览文件 @
66f88dda
...
@@ -461,7 +461,7 @@
...
@@ -461,7 +461,7 @@
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
'
main
'
));
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
'
main
'
));
myChart
.
setOption
({
myChart
.
setOption
({
backgroundColor
:
'
#404a59
'
,
//
backgroundColor: '#404a59',
title
:
{
title
:
{
text
:
'
全国主要城市空气质量
'
,
text
:
'
全国主要城市空气质量
'
,
subtext
:
'
data from PM25.in
'
,
subtext
:
'
data from PM25.in
'
,
...
...
test/custom-children-remove.html
浏览文件 @
66f88dda
...
@@ -42,27 +42,11 @@
...
@@ -42,27 +42,11 @@
require
([
require
([
'
echarts
'
'
echarts
'
// 'echarts/chart/line',
// 'echarts/chart/bar',
// 'echarts/chart/pie',
// 'echarts/chart/scatter',
// 'echarts/chart/custom',
// 'echarts/chart/parallel',
// 'echarts/chart/radar',
// 'echarts/component/grid',
// 'echarts/component/polar',
// 'echarts/component/geo',
// 'echarts/component/singleAxis',
// 'echarts/component/legend',
// 'echarts/component/tooltip',
// 'echarts/component/toolbox',
// 'echarts/component/visualMap',
// 'echarts/component/dataZoom'
],
function
(
ec
)
{
],
function
(
ec
)
{
echarts
=
ec
;
echarts
=
ec
;
chart
=
myChart
=
echarts
.
init
(
document
.
getElementById
(
'
main
'
));
chart
=
myChart
=
echarts
.
init
(
document
.
getElementById
(
'
main
'
));
var
data
=
[
var
data
=
[
{
name
:
'
广州
'
,
value
:
50
},
{
name
:
'
广州
'
,
value
:
50
},
{
name
:
'
深圳
'
,
value
:
72
},
{
name
:
'
深圳
'
,
value
:
72
},
{
name
:
'
珠海
'
,
value
:
30
},
{
name
:
'
珠海
'
,
value
:
30
},
...
@@ -70,10 +54,10 @@ var data = [
...
@@ -70,10 +54,10 @@ var data = [
{
name
:
'
杭州
'
,
value
:
42
},
{
name
:
'
杭州
'
,
value
:
42
},
{
name
:
'
舟山
'
,
value
:
32
},
{
name
:
'
舟山
'
,
value
:
32
},
{
name
:
'
宁波
'
,
value
:
52
}
{
name
:
'
宁波
'
,
value
:
52
}
];
];
option
=
{
option
=
{
tooltip
:
{
tooltip
:
{
trigger
:
'
item
'
trigger
:
'
item
'
},
},
...
@@ -115,9 +99,9 @@ option = {
...
@@ -115,9 +99,9 @@ option = {
renderItem
:
renderProvinceName
,
renderItem
:
renderProvinceName
,
data
:
[
0
]
data
:
[
0
]
}])
}])
};
};
function
renderProvinceName
(
param
,
api
)
{
function
renderProvinceName
(
param
,
api
)
{
var
currentSeriesIndices
=
api
.
currentSeriesIndices
();
var
currentSeriesIndices
=
api
.
currentSeriesIndices
();
currentSeriesIndices
.
pop
();
// remove custom series;
currentSeriesIndices
.
pop
();
// remove custom series;
...
@@ -140,6 +124,7 @@ function renderProvinceName(param, api) {
...
@@ -140,6 +124,7 @@ function renderProvinceName(param, api) {
style
:
{
style
:
{
text
:
serIdx
,
text
:
serIdx
,
fill
:
'
#333
'
,
fill
:
'
#333
'
,
textFill
:
'
#eee
'
,
stroke
:
null
stroke
:
null
}
}
};
};
...
@@ -150,7 +135,7 @@ function renderProvinceName(param, api) {
...
@@ -150,7 +135,7 @@ function renderProvinceName(param, api) {
diffChildrenByName
:
true
,
diffChildrenByName
:
true
,
children
:
nameTexts
children
:
nameTexts
};
};
}
}
chart
.
setOption
(
option
);
chart
.
setOption
(
option
);
});
});
...
...
test/dataZoom-rainfall-inside.html
浏览文件 @
66f88dda
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<h1>
rainfall
</h1>
<h1>
rainfall
</h1>
<div
class=
"chart"
id=
"rainfall"
></div>
<div
class=
"chart"
id=
"rainfall"
></div>
<h1>
zoom lock | Should not prevent default when mouse wheel.
</h1>
<h1>
zoom lock
(only inside)
| Should not prevent default when mouse wheel.
</h1>
<div
class=
"chart"
id=
"zoom-lock"
></div>
<div
class=
"chart"
id=
"zoom-lock"
></div>
<h1>
zoomOnMouseWheel: 'shift', moveOnMouseMove: 'alt' | Should not prevent default when mouse wheel.
</h1>
<h1>
zoomOnMouseWheel: 'shift', moveOnMouseMove: 'alt' | Should not prevent default when mouse wheel.
</h1>
<div
class=
"chart"
id=
"zoom-shift"
></div>
<div
class=
"chart"
id=
"zoom-shift"
></div>
...
...
test/graphicRemove.html
浏览文件 @
66f88dda
...
@@ -51,13 +51,13 @@
...
@@ -51,13 +51,13 @@
id
:
'
text1
'
,
id
:
'
text1
'
,
type
:
'
rect
'
,
type
:
'
rect
'
,
shape
:
{
shape
:
{
x
:
0
,
x
:
0
,
y
:
0
,
y
:
0
,
width
:
100
,
width
:
100
,
height
:
100
,
height
:
100
,
},
},
style
:
{
style
:
{
fill
:
'
red
'
,
fill
:
'
red
'
}
}
}
}
};
};
...
@@ -82,6 +82,7 @@
...
@@ -82,6 +82,7 @@
// });
// });
// 删除后再添加。
// 删除后再添加。
myChart
.
setOption
({
myChart
.
setOption
({
graphic
:
{
id
:
'
text1
'
,
id
:
'
text1
'
,
type
:
'
rect
'
,
type
:
'
rect
'
,
shape
:
{
shape
:
{
...
@@ -93,9 +94,13 @@
...
@@ -93,9 +94,13 @@
style
:
{
style
:
{
fill
:
'
red
'
,
fill
:
'
red
'
,
}
}
}
});
});
},
1000
);
},
1000
);
document
.
getElementById
(
'
wid
'
).
innerText
=
window
.
innerWidth
;
var
hasRect
;
var
hasRect
;
window
.
onresize
=
function
()
{
window
.
onresize
=
function
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录