Closed shuangmianxiaoQ closed 5 months ago
遇到了一样的问题, 怎么解决的呢
也是碰到了这样的问题,现在有一个做法,就是牺牲crosshair的样式,所有设置cursor:crosshair
的都不生效,当然也可以加入一些其他的判断条件,这个主要看使用,方法就是改写setCursorStyle,例如下面的例子
const zr = instanceCharts.getZr();
if (zr && typeof zr.setCursorStyle === 'function') {
const originFuncSetCursorStyle = zr.setCursorStyle.bind(zr);
zr.setCursorStyle = (cursorStyle: string) => {
if (cursorStyle !== 'crosshair') originFuncSetCursorStyle(cursorStyle);
};
}
框选,不应该拿pointer 款选的 交互设计的应该就是这个样子吧
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!
General Questions
In this issue, I have provided information with: 在这个 issue 中我提供了以下信息:
Issue Type
Issue Details
我在使用了
toolbox
中的dataZoom
区域缩放功能后,想要鼠标悬浮在图形元素上的cursor
样式为默认的pointer
,而不是crosshair
。也尝试使用chart.getZr().setCursorStyle('pointer')
来修改鼠标悬浮样式,但开启工具箱dataZoom
功能后,源码中是让整个图表为crosshair
效果,并不能达到我想要的效果,请问这个问题可以优化吗,或者我该如何解决呢?Expected Behavior
Current Behavior
Online Example
源码中重置
cursor
函数:Topics
Anything Else We Need to Know
Environment
ECharts version;ECharts 版本:
4.2.0-rc.2
[ ] It happens only on certain browsers or operating systems. 对于特定浏览器或操作系统才会出现的问题,请提供相应环境信息:{BROWSER_VERSION_OR_OS_INFORMATION_HERE}