You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "liuyizhou (via GitHub)" <gi...@apache.org> on 2023/02/23 09:29:43 UTC
[GitHub] [echarts] liuyizhou opened a new pull request, #18304: feat(treemap): add scaleLimit to limit the zooming. close #14599
liuyizhou opened a new pull request, #18304:
URL: https://github.com/apache/echarts/pull/18304
<!-- Please fill in the following information to help us review your PR more efficiently. -->
## Brief Information
This pull request is in the type of:
- [ ] bug fixing
- [x] new feature
- [ ] others
### What does this PR do?
Add `scaleLimit` option to allow limiting the zooming in treemap.
### Fixed issues
[#14599](https://github.com/apache/echarts/issues/14599)
## Details
### Before: What was the problem?
We don't have any limitation for zooming in treemap.
### After: How does it behave after the fixing?
Support `scaleLimit` in treemap series, as graph series, tree series, geo component did.
Like [scaleLimit in geo](https://echarts.apache.org/en/option.html#geo.scaleLimit)
## Document Info
One of the following should be checked.
- [ ] This PR doesn't relate to document changes
- [x] The document should be updated later
- [ ] The document changes have been made in apache/echarts-doc#xxx
## Misc
### ZRender Changes
- [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
### Related test cases or examples to use the new APIs
`treemap-scaleLimit.html`
## Others
### Merging options
- [ ] Please squash the commits into a single one when merging.
### Other information
--
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
Re: [PR] feat(treemap): add scaleLimit to limit the zooming. close #14599 [echarts]
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia merged PR #18304:
URL: https://github.com/apache/echarts/pull/18304
--
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
[GitHub] [echarts] echarts-bot[bot] commented on pull request #18304: feat(treemap): add scaleLimit to limit the zooming. close #14599
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on PR #18304:
URL: https://github.com/apache/echarts/pull/18304#issuecomment-1441440305
Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).
Document changes are required in this PR. Please also make a PR to [apache/echarts-doc](https://github.com/apache/echarts-doc) for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the `PR: awaiting doc` label.
--
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
[GitHub] [echarts] liuyizhou commented on pull request #18304: feat(treemap): add scaleLimit to limit the zooming. close #14599
Posted by "liuyizhou (via GitHub)" <gi...@apache.org>.
liuyizhou commented on PR #18304:
URL: https://github.com/apache/echarts/pull/18304#issuecomment-1461454517
@Ovilia
--
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
Re: [PR] feat(treemap): add scaleLimit to limit the zooming. close #14599 [echarts]
Posted by "dannishushu (via GitHub)" <gi...@apache.org>.
dannishushu commented on PR #18304:
URL: https://github.com/apache/echarts/pull/18304#issuecomment-2046599082
@liuyizhou
--
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
[GitHub] [echarts] liuyizhou commented on pull request #18304: feat(treemap): add scaleLimit to limit the zooming. close #14599
Posted by "liuyizhou (via GitHub)" <gi...@apache.org>.
liuyizhou commented on PR #18304:
URL: https://github.com/apache/echarts/pull/18304#issuecomment-1441445483
相似的PR:[#17602](https://github.com/apache/echarts/pull/17602)
--
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
[GitHub] [echarts] Ovilia commented on a diff in pull request #18304: feat(treemap): add scaleLimit to limit the zooming. close #14599
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
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
Re: [PR] feat(treemap): add scaleLimit to limit the zooming. close #14599 [echarts]
Posted by "dannishushu (via GitHub)" <gi...@apache.org>.
dannishushu commented on PR #18304:
URL: https://github.com/apache/echarts/pull/18304#issuecomment-2046598949
请问给treemap加scaleLimit最后有没有被merge进rc版本?
--
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
Re: [PR] feat(treemap): add scaleLimit to limit the zooming. close #14599 [echarts]
Posted by "dannishushu (via GitHub)" <gi...@apache.org>.
dannishushu commented on code in PR #18304:
URL: https://github.com/apache/echarts/pull/18304#discussion_r1561931240
##########
src/chart/treemap/TreemapView.ts:
##########
@@ -182,6 +185,8 @@ class TreemapView extends ChartView {
}
this.seriesModel = seriesModel;
+ this.seriesModel.coordinateSystem = new View();
Review Comment:
@liuyizhou @Ovilia Has this commit been merged into the release branch?
--
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
Re: [PR] feat(treemap): add scaleLimit to limit the zooming. close #14599 [echarts]
Posted by "Talar1997 (via GitHub)" <gi...@apache.org>.
Talar1997 commented on PR #18304:
URL: https://github.com/apache/echarts/pull/18304#issuecomment-2127101902
@liuyizhou @Ovilia What is the status of this feature? Is this still in developement or has it been merged?
Is there any workaround to limit zoom on treemap chart?
--
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
Re: [PR] feat(treemap): add scaleLimit to limit the zooming. close #14599 [echarts]
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on PR #18304:
URL: https://github.com/apache/echarts/pull/18304#issuecomment-2160355656
Congratulations! Your PR has been merged. Thanks for your contribution! 👍
--
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
[GitHub] [echarts] Ovilia commented on pull request #18304: feat(treemap): add scaleLimit to limit the zooming. close #14599
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia commented on PR #18304:
URL: https://github.com/apache/echarts/pull/18304#issuecomment-1461536413
@liuyizhou If this PR is ready for review, please click the "Ready for review" button below. Otherwise, we won't notice this. Thanks!
--
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
[GitHub] [echarts] liuyizhou commented on a diff in pull request #18304: feat(treemap): add scaleLimit to limit the zooming. close #14599
Posted by "liuyizhou (via GitHub)" <gi...@apache.org>.
liuyizhou commented on code in PR #18304:
URL: https://github.com/apache/echarts/pull/18304#discussion_r1162277256
##########
src/chart/treemap/TreemapView.ts:
##########
@@ -182,6 +185,8 @@ class TreemapView extends ChartView {
}
this.seriesModel = seriesModel;
+ this.seriesModel.coordinateSystem = new View();
Review Comment:
是的,zoom和coordinateSystem对于scaleLimit来说不是必要的,我根据你的建议修改了代码。我想知道如果我想要为treemap添加类似GraphView的zoom和graphRoam事件,是否可以添加coordinateSystem来实现?@Ovilia
--
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