fix(parallel): calculate axis extent after processing series extents
Brief Information
This pull request is in the type of:
- [X] bug fixing
- [ ] new feature
- [ ] others
What does this PR do?
Calculate the correct axis extent for parallel axes when any series after the first has a larger value than the first series.
option = {
parallelAxis: [
{ dim: 0, name: 'Price' },
{ dim: 1, name: 'Net Weight' },
{ dim: 2, name: 'Amount' },
{
dim: 3,
name: 'Score',
type: 'category',
data: ['Excellent', 'Good', 'OK', 'Bad']
}
],
series: [{
type: 'parallel',
lineStyle: {
width: 4
},
data: [
[12.99, 100, 82, 'Good'],
]
},{
type: 'parallel',
lineStyle: {
width: 4
},
data: [
[20, 120, 60, 'Excellent']
]
}]
};
Fixed issues
- #18082
Details
Before: What was the problem?
parallel lines are being drawn off the ends of the axes when a value in a series after the first has a larger value
After: How does it behave after the fixing?
The axis is now being calculated correctly
Document Info
One of the following should be checked.
- [X] This PR doesn't relate to document changes
- [ ] The document should be updated later
- [ ] The document changes have been made in apache/echarts-doc#xxx
Misc
Security Checking
- [ ] This PR uses security-sensitive Web APIs.
ZRender Changes
- [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
Related test cases or examples to use the new APIs
N.A.
Merging options
- [ ] Please squash the commits into a single one when merging.
Other information
Thanks for your contribution! The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.
Please DO NOT commit the files in dist, i18n, and ssr/client/dist folders in a non-release pull request. These folders are for release use only.
⚠️ MISSING DOCUMENT INFO: Please make sure one of the document options are checked in this PR's description. Search "Document Info" in the description of this PR. This should be done either by the author or the reviewers of the PR.
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-21387@936e870
Congratulations! Your PR has been merged. Thanks for your contribution! 👍