piotrzarzycki21 opened a new pull request, #20969:
URL: https://github.com/apache/echarts/pull/20969
Add buttonPosition option to DataView feature that allows users to customize
the position of buttons in the DataView panel. This enhances flexibility by
enabling precise positioning using top, right, bottom, and left properties.
Test case added in area-large-dataView.html.
<!-- 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?
Adds positioning capability to DataView buttons in the toolbox component.
### Fixed issues
<!--
- #xxxx: ...
-->
## Details
### Before: What was the problem?
Previously, the DataView buttons were fixed at the bottom right of the panel
with a hardcoded style: `position:absolute;bottom:5px;left:0;right:0`. Users
had no way to customize the position of these buttons to match their UI
requirements.
### After: How does it behave after the fixing?
After this change, users can specify exact positioning for the DataView
buttons using the `buttonPosition` property which leverages the existing
`BoxLayoutOptionMixin` type. This allows precise control over the top, right,
bottom, and left positioning of the buttons.
Example usage:
```
option = {
toolbox: {
feature: {
dataView: {
readOnly: false,
lang: ['Cancel', 'OK', 'View data'],
buttonPosition: {
right: '5px',
top: '5px'
}
}
}
}
}
```
## 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
- [x] This PR doesn't depend on ZRender changes.
### Related test cases or examples to use the new APIs
A test case has been added in area-large-dataView.html demonstrating the new
button positioning functionality.
## 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]