提交 16c0acb2 编写于 作者: L lang

Graph support ie8

上级 4be49dec
......@@ -83,6 +83,12 @@
links: graph.links,
categories: categories,
roam: true,
draggable: true,
// edgeSymbol: ['none', 'arrow'],
// scaleLimit: {
// min: 1.5,
// max: 2
// },
label: {
normal: {
position: 'right',
......
......@@ -531,7 +531,7 @@
selectedOffset: 30,
clockwise: true,
data:[
{value:335, name:'直接访问'},
{value:0, name:'直接访问'},
{value:310, name:'邮件营销'},
{value:234, name:'联盟广告'},
{value:135, name:'视频广告'},
......@@ -852,6 +852,99 @@
});
}
function makeGraph() {
var chart = makeChart();
chart.setOption({
tooltip: {},
animationDurationUpdate: 1500,
animationEasingUpdate: 'quinticInOut',
series : [
{
type: 'graph',
layout: 'none',
symbolSize: 50,
roam: true,
label: {
normal: {
show: true
}
},
edgeSymbol: ['circle', 'arrow'],
edgeSymbolSize: [4, 10],
edgeLabel: {
normal: {
textStyle: {
fontSize: 20
}
}
},
data: [{
name: '节点1',
x: 300,
y: 300
}, {
name: '节点2',
x: 800,
y: 300
}, {
name: '节点3',
x: 550,
y: 100
}, {
name: '节点4',
x: 550,
y: 500
}],
// links: [],
links: [{
source: '节点1',
target: '节点2',
symbolSize: [5, 20],
label: {
normal: {
show: true
}
},
lineStyle: {
normal: {
width: 5,
curveness: 0.2
}
}
}, {
source: '节点2',
target: '节点1',
label: {
normal: {
show: true
}
},
lineStyle: {
normal: { curveness: 0.2 }
}
}, {
source: '节点1',
target: '节点3'
}, {
source: '节点2',
target: '节点3'
}, {
source: '节点2',
target: '节点4'
}, {
source: '节点1',
target: '节点4'
}],
lineStyle: {
normal: {
curveness: 0
}
}
}
]
});
}
setTimeout(function () {
makeLine();
}, 500);
......@@ -873,7 +966,12 @@
setTimeout(function () {
makeFunnel();
}, 3000);
makeDataZoom();
setTimeout(function () {
makeDataZoom();
}, 3500);
setTimeout(function () {
makeGraph();
}, 3500);
</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.
先完成此消息的编辑!
想要评论请 注册