You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2020/11/05 04:22:11 UTC
[incubator-echarts-examples] branch next updated: Adjust the order
of graph chart display
This is an automated email from the ASF dual-hosted git repository.
wangdd pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-examples.git
The following commit(s) were added to refs/heads/next by this push:
new 8219346 Adjust the order of graph chart display
8219346 is described below
commit 8219346a75eb6803c382ea50528d1c6d9ec303a7
Author: Wdingding <wa...@gmail.com>
AuthorDate: Thu Nov 5 12:21:53 2020 +0800
Adjust the order of graph chart display
---
public/data/graph-force-dynamic.js | 2 +-
public/data/graph-force.js | 1 +
public/data/graph-force2.js | 7 +++-
public/data/graph-grid.js | 11 +++---
public/data/graph-label-overlap.js | 1 +
public/data/graph-life-expectancy.js | 1 +
public/data/graph-npm.js | 71 +++++++++++++++++-------------------
public/data/graph-simple.js | 1 +
public/data/graph-webkit-dep.js | 4 ++
9 files changed, 54 insertions(+), 45 deletions(-)
diff --git a/public/data/graph-force-dynamic.js b/public/data/graph-force-dynamic.js
index a2a89fc..32e9697 100644
--- a/public/data/graph-force-dynamic.js
+++ b/public/data/graph-force-dynamic.js
@@ -3,9 +3,9 @@ title: Graph Dynamic
category: graph
shotDelay: 5000
titleCN: 动态增加图节点
+difficulty: 5
*/
-
var data = [{
fixed: true,
x: myChart.getWidth() / 2,
diff --git a/public/data/graph-force.js b/public/data/graph-force.js
index 51a27be..7e38dfb 100644
--- a/public/data/graph-force.js
+++ b/public/data/graph-force.js
@@ -2,6 +2,7 @@
title: Force Layout
category: graph
titleCN: 力引导布局
+difficulty: 2
*/
myChart.showLoading();
diff --git a/public/data/graph-force2.js b/public/data/graph-force2.js
index b443eaf..e83d752 100644
--- a/public/data/graph-force2.js
+++ b/public/data/graph-force2.js
@@ -2,6 +2,7 @@
title: Force Layout
category: graph
titleCN: 力引导布局
+difficulty: 1
*/
function createNodes(count) {
@@ -17,7 +18,9 @@ function createNodes(count) {
function createEdges(count) {
var edges = [];
if (count === 2) {
- return [[0, 1]];
+ return [
+ [0, 1]
+ ];
}
for (var i = 0; i < count; i++) {
edges.push([i, (i + 1) % count]);
@@ -58,4 +61,4 @@ option = {
})
};
})
-};
+};
\ No newline at end of file
diff --git a/public/data/graph-grid.js b/public/data/graph-grid.js
index b16f804..ce88542 100644
--- a/public/data/graph-grid.js
+++ b/public/data/graph-grid.js
@@ -2,9 +2,10 @@
title: Graph on Cartesian
category: graph
titleCN: 笛卡尔坐标系上的 Graph
+difficulty: 4
*/
-var axisData = ['周一','周二','周三','很长很长的周四','周五','周六','周日'];
+var axisData = ['周一', '周二', '周三', '很长很长的周四', '周五', '周六', '周日'];
var data = axisData.map(function (item, i) {
return Math.round(Math.random() * 1000 * (i + 1));
});
@@ -21,12 +22,12 @@ option = {
},
tooltip: {},
xAxis: {
- type : 'category',
- boundaryGap : false,
- data : axisData
+ type: 'category',
+ boundaryGap: false,
+ data: axisData
},
yAxis: {
- type : 'value'
+ type: 'value'
},
series: [
{
diff --git a/public/data/graph-label-overlap.js b/public/data/graph-label-overlap.js
index 66fd588..6c60cd0 100644
--- a/public/data/graph-label-overlap.js
+++ b/public/data/graph-label-overlap.js
@@ -2,6 +2,7 @@
title: Hide Overlapped Label
category: graph
titleCN: 关系图自动隐藏重叠标签
+difficulty: 3
*/
myChart.showLoading();
diff --git a/public/data/graph-life-expectancy.js b/public/data/graph-life-expectancy.js
index 9b0cfb6..d4e4e73 100644
--- a/public/data/graph-life-expectancy.js
+++ b/public/data/graph-life-expectancy.js
@@ -2,6 +2,7 @@
title: Graph Life Expectancy
category: graph
titleCN: Graph Life Expectancy
+difficulty: 5
*/
diff --git a/public/data/graph-npm.js b/public/data/graph-npm.js
index 629db23..c0209f4 100644
--- a/public/data/graph-npm.js
+++ b/public/data/graph-npm.js
@@ -2,6 +2,7 @@
title: NPM Dependencies
category: graph
titleCN: NPM 依赖关系图
+difficulty: 6
*/
myChart.showLoading();
@@ -13,45 +14,41 @@ $.getJSON(ROOT_PATH + '/data/asset/data/npmdepgraph.min10.json', function (json)
},
animationDurationUpdate: 1500,
animationEasingUpdate: 'quinticInOut',
- series : [
- {
- type: 'graph',
- layout: 'none',
- // progressiveThreshold: 700,
- data: json.nodes.map(function (node) {
- return {
- x: node.x,
- y: node.y,
- id: node.id,
- name: node.label,
- symbolSize: node.size,
- itemStyle: {
- color: node.color
- }
- };
- }),
- edges: json.edges.map(function (edge) {
- return {
- source: edge.sourceID,
- target: edge.targetID
- };
- }),
- emphasis: {
- label: {
- position: 'right',
- show: true
+ series: [{
+ type: 'graph',
+ layout: 'none',
+ // progressiveThreshold: 700,
+ data: json.nodes.map(function (node) {
+ return {
+ x: node.x,
+ y: node.y,
+ id: node.id,
+ name: node.label,
+ symbolSize: node.size,
+ itemStyle: {
+ color: node.color
}
- },
- roam: true,
- emphasis: {
- focus: 'adjacency'
- },
- lineStyle: {
- width: 0.5,
- curveness: 0.3,
- opacity: 0.7
+ };
+ }),
+ edges: json.edges.map(function (edge) {
+ return {
+ source: edge.sourceID,
+ target: edge.targetID
+ };
+ }),
+ emphasis: {
+ focus: 'adjacency',
+ label: {
+ position: 'right',
+ show: true
}
+ },
+ roam: true,
+ lineStyle: {
+ width: 0.5,
+ curveness: 0.3,
+ opacity: 0.7
}
- ]
+ }]
}, true);
});
\ No newline at end of file
diff --git a/public/data/graph-simple.js b/public/data/graph-simple.js
index a80ca88..911733a 100644
--- a/public/data/graph-simple.js
+++ b/public/data/graph-simple.js
@@ -2,6 +2,7 @@
title: Simple Graph
category: graph
titleCN: Graph 简单示例
+difficulty: 1
*/
option = {
diff --git a/public/data/graph-webkit-dep.js b/public/data/graph-webkit-dep.js
index 6890b0b..a044007 100644
--- a/public/data/graph-webkit-dep.js
+++ b/public/data/graph-webkit-dep.js
@@ -2,9 +2,13 @@
title: Graph Webkit Dep
category: graph
titleCN: WebKit 模块关系依赖图
+shotWidth: 900
+difficulty: 6
*/
myChart.showLoading();
+
+myChart.showLoading();
$.get(ROOT_PATH + '/data/asset/data/webkit-dep.json', function (webkitDep) {
myChart.hideLoading();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org