ArianaWang opened a new issue #8126: 富文本标签如何实现文字高亮
URL: https://github.com/apache/incubator-echarts/issues/8126
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   
   ### One-line summary [问题简述]
   想要在富文本标签中实现文本的高亮,当鼠标点击或者鼠标悬停是文字显示高亮
   
   
   
   
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]:3.7
   + Browser version [浏览器类型和版本]:Chrome
   + OS Version [操作系统类型和版本]:Windows10
   
   
   
   
   
   ### Expected behaviour [期望结果]
   
   
   当鼠标点击或者鼠标悬停是文字显示高亮
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 
option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option = {
    series: [
           {
               type: 'scatter',
               data: [[0,0]],
               symbolSize: 1,
               label: {
                  
                   normal: {
                       show: true,
                       formatter: [
                           '#.第一段描述',
                           '#.第二段描述',
                           '#.第三段描述',
                       ].join('\n'),
                       backgroundColor: 'rgb(0,43,92)',
                       borderWidth: 2,
                       borderRadius: 5,
                       padding: 10,
                       color: '#fff',
                       fontSize: 14,
                       shadowBlur: 3,
                       shadowColor: '#fff',
                       shadowOffsetX: 0,
                       shadowOffsetY: 3,
                       lineHeight: 34,
                       rich: {
                           term: {
                                fontWeight: 'bold',
                               fontSize: 25,
                               color: 'rgb(199,86,85)'
                           },
                           term1: {
                                fontWeight: 'bold',
                               fontSize: 20,
                               color: 'yellow'
                           },
                           fregment1: {
                               backgroundColor: '#000',
                               color: 'yellow',
                               padding: 5
                           },
                           fregment2: {
                               backgroundColor: '#339911',
                               color: '#fff',
                               borderRadius: 15,
                               padding: 5
                           }
                       }
                   }
              
               }
           }
       ],
       xAxis: {
           axisLabel: {show: false},
           axisLine: {show: false},
           splitLine: {show: false},
           axisTick: {show: false},
           min: -1,
           max: 1
       },
       yAxis: {
           axisLabel: {show: false},
           axisLine: {show: false},
           splitLine: {show: false},
           axisTick: {show: false},
           min: -1,
           max: 1
       }
   }
   
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]

Reply via email to