apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.66k stars 19.61k forks source link

[Bug] toolbox中的 saveasimage 属性如果在 feature 对象的最后一个时,saveasimage 的 hover 文字总是在下面,无法调整位置! #19626

Open JackFrancisLiu opened 9 months ago

JackFrancisLiu commented 9 months ago

Version

5.4.2

Link to Minimal Reproduction

Steps to Reproduce

toolbox: { show: true, top: 16, feature: { magicType: { show: true, type: ['line', 'bar'] }, dataView: { show: true, readOnly: false, lang: ['数据视图', '关闭', '刷新'], }, restore: { show: true }, saveAsImage: { show: true, },

            },
            emphasis: {
              iconStyle: {
                textPosition: 'top',
              }
            },

            right: '16px',
            itemSize: 10,
          },

Current Behavior

微信图片_20240221102054 微信图片_20240221102059

如图所示 emphasis 属性已经设置了hover文字位置,但是saveasimage hover位置还是在下方。 emphasis: { iconStyle: { textPosition: 'top', } }

Expected Behavior

希望设置完之后hover文字位置正确!

Environment

- OS:windows
- Browser: Chrome 96
- Framework:Vue@3 框架Vue@3

Any additional comments?

No response

echarts-bot[bot] commented 9 months ago

@JackFrancisLiu It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED
**TITLE** [Bug] If the saveasimage property in toolbox is at the end of the feature object, the hover text of saveasimage is always below, and the position cannot be adjusted! **BODY** ### Version 5.4.2 ### Link to Minimal Reproduction none ### Steps to Reproduce toolbox: { show: true, top: 16, feature: { magicType: { show: true, type: ['line', 'bar'] }, dataView: { show: true, readOnly: false, lang: ['data view', 'close', 'refresh'], }, restore: { show: true }, saveAsImage: { show: true, }, }, emphasis: { iconStyle: { textPosition: 'top', } }, right: '16px', itemSize: 10, }, ### Current Behavior WeChat picture_20240221102054 WeChat picture_20240221102059 As shown in the figure, the emphasis attribute has set the hover text position, but the saveasimage hover position is still below. emphasis: { iconStyle: { textPosition: 'top', } } ### Expected Behavior I hope the hover text will be positioned correctly after setting it up! ### Environment ```markdown -OS:windows - Browser: Chrome 96 - Framework:Vue@3 FrameworkVue@3 ``` ### Any additional comments? _No response_
helgasoft commented 9 months ago

yes, a bug. If you really want the hover text up, a workaround is to place saveAsImage first in feature - Demo Code