Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/treemap emphasis #12471

Merged
merged 2 commits into from
Apr 22, 2020
Merged

Fix/treemap emphasis #12471

merged 2 commits into from
Apr 22, 2020

Conversation

100pah
Copy link
Member

@100pah 100pah commented Apr 21, 2020

  1. Enable treemap emphasis label formatter. Fix Add missing param for treemap setLabelStyle #11854. And add test cases.
    [Details]:
    The implementation of "insert levelModel" is migrate from "Tree.getModel"
    to "beforeLink nodeData.wrapMethod('getItemModel', ...)", because the former
    one miss the case of data.getItemModel, which is needed in label formatter fetcher.

  2. Fix the incorrect implementation of leavesModel in TreeSeries.
    This defect is found when fix "1". "1" and "2" are sharing the same data structure (Tree, insert model) so we'd better fix them together.
    [Details]:
    leavesModel should be inserted between the node itemModel and the seriesModel in the "parentModel" chain.
    It can be added either via [A] "beforeLink - nodeData.wrapMethod('getItemModel, ...)"
    or via [B] "TreeNode.getModel ".
    But TreeSeres both use the two strategy, which causes the leavesModel is inserted twice.

`leavesModel` should be inserted between the node `itemModel` and the `seriesModel` in the "parentModel" chain.
It can be added either via [A] "beforeLink - nodeData.wrapMethod('getItemModel, ...)"
or via [B] "TreeNode.getModel ".
But `TreeSeres` both use the two strategy, which causes the `leavesModel` is inserted twice.

In fact the strategy [A] have some defect (do not cover the case `data.getItemModel(...)`).
So [A] should not be used any more. [B] is recommended.
…t cases.

Note: the implementation of "insert levelModel" is modified from "Tree.getModel"
to "beforeLink  nodeData.wrapMethod('getItemModel', ...)", because the former
one miss the case of `data.getItemModel`, which is needed in label formatter fetcher.
@100pah 100pah merged commit 8c2267d into master Apr 22, 2020
@echarts-bot
Copy link

echarts-bot bot commented Apr 22, 2020

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@100pah 100pah deleted the fix/treemap-emphasis branch April 22, 2020 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants