-
Notifications
You must be signed in to change notification settings - Fork 19.7k
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
feat(funnel): funnel chart support orient API #12754
Conversation
[DISCUSS_layout_config] @pissang @Ovilia @regrex If intending to support sort: 'ascending', // porp "sort" exists for long time.
orient: 'vertical', sort: 'descending',
orient: 'vertical', sort: 'asscending',
orient: 'horizontal', sort: 'descending',
orient: 'horizontal', |
[DISCUSS_label_position_config] @pissang @Ovilia @regrex If there Currently, for vertical layout, funnel But Question 1:There are counterintuitive behavior for orient: 'vertical',
sort: 'ascending'
label: {
position: 'rightTop'
} But actually the labels are placed at the position "rightBottom": And orient: 'vertical',
sort: 'ascending'
label: {
position: 'rightBottom'
} actually the labels are placed at the position "rightTop": The reason probably be: the implementation of label position is only according to the case of Thus the question is: should we correct it? Question 2:Now we need to support (A) If we follow the "counterintuitive" design: the position should be only understand on the case of It is counterintuitive: orient: 'right',
label: { position: 'right' } // use position right to place label on bottom But that would be simple in implementation and do not need to worry about break change (described in question 1). In a sense, it can be reasonable since funnel is literally something always "vertical" in mind: (B) Make it totally follow the intuitive: So the question is: (A) or (B) ? |
@100pah I have also considered this problem. At the beginning, my plan is to increase the value of position for the original scenario of horizontal: top \ bottom \ topleft \ topright \ bottomleft \ bottomright. But later, considering that users need to associate two APIs to view documents at the same time, it simplifies the design of position. When the original is horizontal, I think it is to connect the entire entire funnel Chart rotates 90 degrees anticlockwise, and the left value of position corresponds to the bottom value of horizontal. At present, my mapping relationship implementation is a bit messy, which needs to be adjusted. |
6e5beb7
to
a12b9c7
Compare
@@ -86,9 +86,10 @@ | |||
left: 300, | |||
right: 300, | |||
sort: 'ascending', | |||
orient: 'horizontal', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should better add some new test cases for orient: 'horizontal'
rather than change the original 'vertical' test cases.
Hint: in echarts source dir,
npm run mktest funnel2
will generate a test caes file test/funnel2.html
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
Brief Information
This pull request is in the type of:
What does this PR do?
Funnel chart support orient API with value vertical(default) or horizontal.
Fixed issues
Details
Usage
Are there any API changes?
series-funnel.orient: vertical | horizontal
Related test cases or examples to use the new APIs
NA.
Others
Merging options
Other information