jiawulin001 commented on issue #16773: URL: https://github.com/apache/echarts/issues/16773#issuecomment-1084217974
@emyly 你好,目前提供选中图形的方法有两种,一种是`select`方法,参见[select文档](https://echarts.apache.org/zh/option.html#series-bar.select)。 第二种是用on监听'click'事件,然后监测到click之后对option进行改变,参考[鼠标事件](https://echarts.apache.org/handbook/zh/concepts/event)。 Hi, currently there are two ways to highlight the column. The first one is to use `select`, referring to [documentation](https://echarts.apache.org/zh/option.html#series-bar.select). The second one is to use 'on' to add listener for 'click' event, and alter `option` when 'click' is dispatched, referring to [mouse event](https://echarts.apache.org/handbook/zh/concepts/event). 以下提供一种select的方案,可供参考 The following example using `select` can be referred to: <details> <summary>Code Sample</summary> ``` option = { xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yAxis: { type: 'value' }, series: [ { data: [120, {value: 200,name:'data'}, 150, 80, 70, 110, 130], type: 'bar', name: 'but', selectedMode: 'single', select: { itemStyle: { shadowBlur: 30, shadowColor: 'rgba(255,0,0,0.8)' } } } ], legend: {}, tooltip: { trigger:'axis', axisPointer: { type: 'shadow', shadowStyle: { color: 'blue', opacity: 0.1 } } } }; ``` </details> -- 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: commits-unsubscr...@echarts.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org