You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/05/18 03:52:42 UTC
[echarts] 01/01: treemap: use treeAncestors in callback params
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch pissang-patch-1
in repository https://gitbox.apache.org/repos/asf/echarts.git
commit bcc03056907b82fe4e107f92a0e7dd25e93987a6
Author: Yi Shen <bm...@gmail.com>
AuthorDate: Tue May 18 11:52:32 2021 +0800
treemap: use treeAncestors in callback params
---
src/chart/treemap/TreemapSeries.ts | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/chart/treemap/TreemapSeries.ts b/src/chart/treemap/TreemapSeries.ts
index fab2fc3..88121f7 100644
--- a/src/chart/treemap/TreemapSeries.ts
+++ b/src/chart/treemap/TreemapSeries.ts
@@ -76,7 +76,12 @@ interface TreePathInfo {
}
interface TreemapSeriesCallbackDataParams extends CallbackDataParams {
+ /**
+ * @deprecated
+ */
treePathInfo?: TreePathInfo[]
+
+ treeAncestors?: TreePathInfo[]
}
interface ExtraStateOption {
@@ -412,7 +417,9 @@ class TreemapSeriesModel extends SeriesModel<TreemapSeriesOption> {
const params = super.getDataParams.apply(this, arguments as any) as TreemapSeriesCallbackDataParams;
const node = this.getData().tree.getNodeByDataIndex(dataIndex);
- params.treePathInfo = wrapTreePathInfo(node, this);
+ params.treeAncestors = wrapTreePathInfo(node, this);
+ // compatitable the previous code.
+ params.treePathInfo = params.treeAncestors;
return params;
}
@@ -575,4 +582,4 @@ function setDefault(levels: TreemapSeriesLevelOption[], ecModel: GlobalModel) {
return levels;
}
-export default TreemapSeriesModel;
\ No newline at end of file
+export default TreemapSeriesModel;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org