Closed CastielCheng closed 7 years ago
echarts版本是2.2.7,使用的是横向柱状图,mouseout事件报t.className.match is not a function, 加上myChart.un(echarts.config.EVENT.MOUSEOUT)这句也不起作用, 重写MOUSEOUT事件,阻止事件冒泡也不起作用。
var option = { animation : true, legend: { data:[''], show:false }, title : { text : '', x : 'center', y : 'top', padding : 0 }, tooltip : { 'trigger' : 'axis', formatter : "{b}:{c}" }, grid : { x : 70, y : 20, x2 : 30, y2 : 40 }, xAxis : [ { 'type' : 'value', boundaryGap : [ 0, 0.1 ] } ], yAxis : [ { 'type' : 'category', 'axisLabel' : { show : false }, 'data' : [] } ], series : [ { type : 'bar', data : [], barMinHeight : 2, barWidth : 10, boundaryGap : false, itemStyle : { normal : { label : { show : true, position : 'right', formatter : function(params, newWord, value) { return params.name + ":" + params.value; } } } }, barGap : '50%' } ] };
效果图:
一样的问题
这个问题的解决可以参考1楼的方案:
echarts版本是2.2.7,使用的是横向柱状图,mouseout事件报t.className.match is not a function, 加上myChart.un(echarts.config.EVENT.MOUSEOUT)这句也不起作用, 重写MOUSEOUT事件,阻止事件冒泡也不起作用。
效果图: