Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
半栈学徒
incubator-echarts
提交
d775fadb
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,发现更多精彩内容 >>
提交
d775fadb
编写于
3月 01, 2016
作者:
L
lang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update examples
上级
66a28420
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
227 addition
and
8 deletion
+227
-8
test/dataZoom-rainfall-connect.html
test/dataZoom-rainfall-connect.html
+98
-6
test/force2.html
test/force2.html
+5
-1
test/graph.html
test/graph.html
+0
-1
test/largeLine.html
test/largeLine.html
+124
-0
未找到文件。
test/dataZoom-rainfall-connect.html
浏览文件 @
d775fadb
...
...
@@ -9,12 +9,19 @@
html
,
body
,
#main
,
#main2
{
width
:
100%
;
height
:
300px
;
#main2
,
#main3
{
width
:
90%
;
height
:
200px
;
margin
:
0
;
padding
:
0
;
}
#main2
{
width
:
75%
;
}
#main3
{
width
:
50%
;
}
#middle
{
text-align
:
center
;
padding
:
10px
;
...
...
@@ -26,6 +33,7 @@
上面是降水量,下面是流量。这是两个echarts实例。
</div>
<div
id=
"main2"
></div>
<div
id=
"main3"
></div>
<script>
...
...
@@ -43,8 +51,9 @@
],
function
(
data
,
echarts
)
{
var
chart1
=
createChart1
(
data
,
echarts
);
var
chart2
=
createChart2
(
data
,
echarts
);
var
chart3
=
createChart3
(
data
,
echarts
);
echarts
.
connect
([
chart1
,
chart2
]);
echarts
.
connect
([
chart1
,
chart2
,
chart3
]);
// chart1.on('dataZoom', function (payload) {
// chart2.dispatchAction({
...
...
@@ -81,7 +90,11 @@
grid
:
[
{
show
:
true
,
borderWidth
:
0
borderWidth
:
0
,
left
:
0
,
right
:
0
,
top
:
0
,
bottom
:
0
}
],
toolbox
:
{
...
...
@@ -158,7 +171,86 @@
grid
:
[
{
show
:
true
,
borderWidth
:
0
borderWidth
:
0
,
left
:
0
,
right
:
0
,
top
:
0
,
bottom
:
0
}
],
xAxis
:
[
{
type
:
'
category
'
,
boundaryGap
:
true
,
axisLabel
:
{
show
:
true
},
splitLine
:
{
show
:
false
},
axisLine
:
{
show
:
true
,
},
data
:
data
.
category
}
],
yAxis
:
[
{
boundaryGap
:
false
,
position
:
'
right
'
,
inverse
:
true
,
axisLabel
:
{
textStyle
:
{
color
:
'
#666
'
}
},
axisLine
:
{
lineStyle
:
{
color
:
'
#666
'
}
}
}
],
series
:
[
{
name
:
'
流量
'
,
type
:
'
line
'
,
data
:
data
.
flow
,
itemStyle
:
{
normal
:
{
areaStyle
:
{}
}
}
}
],
dataZoom
:
[
{
type
:
'
inside
'
,
start
:
30
,
end
:
40
}
]
});
return
chart
;
}
function
createChart3
(
data
,
echarts
)
{
var
chart
=
echarts
.
init
(
document
.
getElementById
(
'
main3
'
),
null
,
{
renderer
:
'
canvas
'
});
chart
.
setOption
({
tooltip
:
{
trigger
:
'
axis
'
,
},
legend
:
{
data
:
[
'
流量
'
]
},
grid
:
[
{
show
:
true
,
borderWidth
:
0
,
left
:
0
,
right
:
0
,
top
:
0
,
bottom
:
0
}
],
xAxis
:
[
...
...
test/force2.html
浏览文件 @
d775fadb
...
...
@@ -47,7 +47,11 @@
node
.
itemStyle
=
null
;
node
.
symbolSize
=
10
;
node
.
value
=
node
.
symbolSize
;
node
.
label
.
normal
.
show
=
node
.
symbolSize
>
30
;
node
.
label
=
{
normal
:
{
show
:
node
.
symbolSize
>
30
}
};
node
.
category
=
node
.
attributes
[
'
modularity_class
'
];
node
.
x
=
node
.
y
=
null
;
});
...
...
test/graph.html
浏览文件 @
d775fadb
...
...
@@ -48,7 +48,6 @@
graph
.
nodes
.
forEach
(
function
(
node
)
{
delete
node
.
itemStyle
;
node
.
value
=
node
.
symbolSize
;
// node.label.normal.show = node.symbolSize > 30;
node
.
label
=
{
normal
:
{
show
:
node
.
symbolSize
>
30
...
...
test/largeLine.html
0 → 100644
浏览文件 @
d775fadb
<html>
<head>
<meta
charset=
"utf-8"
>
<script
src=
"esl.js"
></script>
<script
src=
"config.js"
></script>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
</head>
<body>
<style>
html
,
body
,
#main
{
width
:
100%
;
height
:
100%
;
margin
:
0
;
}
</style>
<div
id=
"timing"
></div>
<script>
require
([
'
echarts
'
,
'
echarts/chart/bar
'
,
'
echarts/chart/line
'
,
'
echarts/component/legend
'
,
'
echarts/component/grid
'
,
'
echarts/component/dataZoom
'
,
'
echarts/component/tooltip
'
],
function
(
echarts
)
{
var
myChart
;
var
lineCount
=
2
;
var
pointCount
=
10000
;
var
chartCount
=
5
;
var
option
=
{
tooltip
:
{
trigger
:
'
axis
'
,
showContent
:
false
,
axisPointer
:
{
animation
:
false
}
},
legend
:
{
data
:[]
},
dataZoom
:
[{
show
:
true
,
realtime
:
true
,
// showDataShadow: false,
start
:
50
,
end
:
60
}],
xAxis
:
[
{
type
:
'
time
'
}
],
yAxis
:
[
{
type
:
'
value
'
}
],
series
:
[],
animation
:
false
};
var
lineStyle
=
{
normal
:
{
width
:
2
,
opacity
:
1
}
};
var
date
=
[];
var
oneDay
=
24
*
3600
*
1000
;
var
base
=
+
new
Date
(
1897
,
9
,
3
);
for
(
var
j
=
0
;
j
<
pointCount
;
j
++
)
{
var
now
=
new
Date
(
base
+=
oneDay
);
date
.
push
([
now
.
getFullYear
(),
now
.
getMonth
()
+
1
,
now
.
getDate
()].
join
(
'
-
'
));
}
for
(
var
i
=
0
;
i
<
lineCount
;
i
++
)
{
var
y
=
Math
.
random
()
*
1000
;
var
values
=
[];
for
(
var
j
=
0
;
j
<
pointCount
;
j
++
)
{
y
+=
Math
.
round
(
10
+
Math
.
random
()
*
(
-
10
-
10
));
values
.
push
(
[
date
[
j
],
// Math.random()
<
0.1
?
'
-
'
:
y
y
]
);
}
option
.
legend
.
data
.
push
(
'
line
'
+
i
);
option
.
series
.
push
({
name
:
'
line
'
+
i
,
type
:
'
line
'
,
sampling
:
'
average
'
,
hoverAnimation
:
false
,
showSymbol
:
false
,
data
:
values
,
lineStyle
:
lineStyle
});
}
function
refresh
(
isBtnRefresh
){
var
start
=
new
Date
();
for
(
var
n
=
0
;
n
<
chartCount
;
n
++
)
{
var
el
=
document
.
createElement
(
'
div
'
);
el
.
innerHTML
=
'
<h1>
'
+
n
+
'
</h1><div id="chart
'
+
n
+
'
" style="width: 860px; height: 320px"></div>
'
;
document
.
body
.
appendChild
(
el
);
myChart
=
echarts
.
init
(
document
.
getElementById
(
'
chart
'
+
n
));
myChart
.
setOption
(
option
,
true
);
}
var
end
=
new
Date
();
document
.
getElementById
(
'
timing
'
).
innerHTML
=
'
Graphs loaded in
'
+
(
end
-
start
)
+
'
ms.
'
;
};
refresh
();
});
</script>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录