zaiMoe opened a new issue #10032: symbolSize如何自定义hover时的大小 URL: https://github.com/apache/incubator-echarts/issues/10032 #### Version 3.7.2 link https://www.echartsjs.com/examples/editor.html?c=scatter-punchCard 将里面的代码替换成下面的配置 #### 问题 散点图自定义了`symbol:rect, symbolSize: [1, 20]` 导致hover的时候放大比例异常,目前通过设置`hoverAnimation: false`和`itemStyle.emphasis`来简单的实现hover变化,有其他更好的解决方法吗? #### 配置 ``` var hours = []; var date = new Date(); var time = date.getTime(); for (var n = 0; n < 100; n++) { // hours.push(time + 1000 * 60 * 60 * n); hours.push(n + 1) } var days = ['Saturday', 'Friday', 'Thursday', 'Wednesday']; var data = []; for (var i = 0; i < 4; i++) { for (var j = 0; j < hours.length; j++) { data.push([j + 1, i, Math.round() * 10]) } } option = { tooltip: { formatter: function (params) { return params.value[2]; } }, xAxis: { type: 'category', data: hours, boundaryGap: false, axisLine: { show: true } }, yAxis: { type: 'category', data: days, axisLine: { show: true } }, series: [{ name: 'Punch Card', type: 'scatter', symbol: 'rect', symbolSize: function (val) { return [1, 20]; }, data: data, animationDelay: function (idx) { return idx * 5; } }] }; ```
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
