You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2018/04/05 20:35:32 UTC
[incubator-echarts] 02/09: tweak lines tooltip.
This is an automated email from the ASF dual-hosted git repository.
sushuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit 904cb028bafa8f520f868fa342eb17dcbfa51c3a
Author: sushuang <su...@gmail.com>
AuthorDate: Mon Apr 2 20:30:16 2018 +0800
tweak lines tooltip.
---
src/chart/helper/LineDraw.js | 2 ++
src/data/Graph.js | 2 +-
test/tree-basic.html | 15 +++++++++++++++
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/chart/helper/LineDraw.js b/src/chart/helper/LineDraw.js
index b1f1982..0af0fa3 100644
--- a/src/chart/helper/LineDraw.js
+++ b/src/chart/helper/LineDraw.js
@@ -117,7 +117,9 @@ lineDrawProto.incrementalUpdate = function (taskParams, lineData) {
if (lineNeedsDraw(itemLayout)) {
var el = new this._ctor(lineData, idx, this._seriesScope);
el.traverse(updateIncrementalAndHover);
+
this.group.add(el);
+ lineData.setItemGraphicEl(idx, el);
}
}
};
diff --git a/src/data/Graph.js b/src/data/Graph.js
index 3df752c..1864bee 100644
--- a/src/data/Graph.js
+++ b/src/data/Graph.js
@@ -441,7 +441,7 @@ function Edge(n1, n2, dataIndex) {
* @param {string} [path]
* @return {module:echarts/model/Model}
*/
- Edge.prototype.getModel = function (path) {
+Edge.prototype.getModel = function (path) {
if (this.dataIndex < 0) {
return;
}
diff --git a/test/tree-basic.html b/test/tree-basic.html
index de663f2..62cc5af 100644
--- a/test/tree-basic.html
+++ b/test/tree-basic.html
@@ -47,6 +47,7 @@
series:[
{
type: 'tree',
+ id: 'a',
data: [data],
@@ -78,6 +79,20 @@
}
]
});
+
+
+ setTimeout(function () {
+ var newData = echarts.util.clone(data);
+ newData.children.splice(0, 1);
+
+ chart.setOption({
+ series: {
+ id: 'a',
+ data: [newData]
+ }
+ });
+ }, 1000);
+
});
});
</script>
--
To stop receiving notification emails like this one, please contact
sushuang@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org