You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "Ovilia (via GitHub)" <gi...@apache.org> on 2023/03/28 08:41:52 UTC
[GitHub] [echarts] Ovilia commented on a diff in pull request #18304: feat(treemap): add scaleLimit to limit the zooming. close #14599
Ovilia commented on code in PR #18304:
URL: https://github.com/apache/echarts/pull/18304#discussion_r1150230579
##########
src/chart/treemap/TreemapSeries.ts:
##########
@@ -505,6 +511,10 @@ class TreemapSeriesModel extends SeriesModel<TreemapSeriesOption> {
enableAriaDecal() {
enableAriaDecalForTree(this);
}
+
+ setZoom(zoom: number) {
+ this.option.zoom = zoom;
Review Comment:
`this.option` should never be changed. Try to use `this._xxx` instead.
##########
src/chart/treemap/TreemapView.ts:
##########
@@ -182,6 +185,8 @@ class TreemapView extends ChartView {
}
this.seriesModel = seriesModel;
+ this.seriesModel.coordinateSystem = new View();
Review Comment:
Adding `coordinateSystem` to the series model may not be necessary. How about setting `zoomLimit` on `controllerHost` as [GraphView](https://github.com/apache/echarts/blob/6dbe25ca7e5655c9a6cd73b2d489df8ff38f5fbe/src/chart/graph/GraphView.ts#L253-L254) does?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org