-
Notifications
You must be signed in to change notification settings - Fork 19.8k
feat(matrix): new matrix coordinate #19807
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
Conversation
Thanks for your contribution! The pull request is marked to be |
Document changes are required in this PR. Please also make a PR to 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 |
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-19807@a43e38d |
…se label.padding uniformly.
Feat matrix enhance
…ct geo/insideDataZoom/treemap/sankey/graph roam)
…But it was based on canvas width/height, which is not reasonable - the unit may incorrect, and it is unpredictable if the `View['_rect']` is not calculated based on the current canvas rect. Therefore the percentage value is changed to based on `View['_rect'].width/height` since v6. Under this definition, users can use '0%' to map the top-left of `View['_rect']` to the center of `View['_viewRect']`.
…ectVerticalAlign` for series.map/geo/series.graph in box layout (lay out by left/right/top/bottom/width/height). (2) Support `clip` on geo/series.map (3) Support `roamTigger: 'global' | 'selfRect'` to switch roam area to global on only self bounding rect. (4) Support cursor style change when hovering the roaming enabled area to hint users. (5) Fix that center and zoom option does not work in series.sankey, and no relevant test case. (the roam is introduced in impl in #20321, due v6). (6) Fix the percent base of `center` (such as `center: ['40%', '50%']`) for all View coord sys based components/series (geo/series.map/series.graph/series.tree/series.sankey). #16904 introcuded percentage string here, such as '33%'. But it was based on canvas width/height, which is not reasonable - the unit may incorrect, and it is unpredictable if the `View['_rect']` is not calculated based on the current canvas rect. Therefore the percentage value is changed to based on `View['_rect'].width/height` since v6. Under this definition, users can use '0%' to map the top-left of `View['_rect']` to the center of `View['_viewRect']`. (7) Enhance the behavior for roaming area overlapping - the upper one has higher precedence. (8) Fix some `scaleLimit` missing. (9) Some refactor and clarification of `RoamController` and `roamHelper`.
Roaming Infrastructure UpgradeSupport
|
…tension, and add test cases. (2) Fix RoamController cursor style.
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
ThumbnailThe final refactor of Thumbnail is make here. Thumbnail is finally designed as a component. const option = {
series: {
type: 'graph',
// ...
},
thumbnail: {
// ...
seriesId: 'xxx', // Optional, use the first series.graph by default.
seriesIndex: 0, // Optional, use the first series.graph by default.
}
} Currently thumbnail only support series.graph. The thumbnail options: {
type?: string;
id?: OptionId;
name?: OptionName;
z?: number;
zlevel?: number;
coordinateSystem?: string
coordinateSystemUsage?: CoordinateSystemUsageOption
coord?: CoordinateSystemDataCoord
width?: PositionSizeOption;
height?: PositionSizeOption;
top?: PositionSizeOption;
right?: PositionSizeOption;
bottom?: PositionSizeOption;
left?: PositionSizeOption;
show?: boolean
itemStyle?: ItemStyleOption
windowStyle?: ItemStyleOption
seriesIndex?: number | number[]
seriesId?: string | string[]
} The example is The minimal echarts option to enable thumbnail on graph: chart.setOption({
series: {
type: 'graph',
data: [{
itemStyle: null,
name: 'DRD2',
value: 40,
symbolSize: 40
}, {
itemStyle: null,
name: 'ADORA2A',
value: 0,
symbolSize: 20
}],
links: [],
},
thumbnail: {}, // declare a thumbnail component, use the first series.graph by default.
}); |
Brief Information
This pull request is in the type of:
What does this PR do?
This PR introduces a new coordinate called "Matrix".
Matrix can serve as:
The layout base of data items of a series
Multiple series like heatmap, pie, graph, custom can be used along with it.
More applications:
Fixed issues
Details
Before: What was the problem?
After: How does it behave after the fixing?
Document Info
One of the following should be checked.
The full document will be published when v6.0.0 is released.
Current doc for v6.0.0-beta:
Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information