realeve opened a new issue #13905:
URL: https://github.com/apache/incubator-echarts/issues/13905


   ### Version
   5.0.0
   
   ### Steps to reproduce
   tooltip自定义文字颜色无法生效
   
   ### What is expected?
   测试
   
![image](https://user-images.githubusercontent.com/448208/103334452-46f19580-4aac-11eb-90b0-fd676b619ea6.png)
   
   ```js
   option = {
       xAxis: { 
           data: ['Mon', 'Tue']
       },
       yAxis: {
           type: 'value'
       },
       backgroundColor:'#333',
       darkMode:true,
         tooltip: {
           backgroundColor: 'rgba(48, 54, 64, 0.8)', 
           extraCssText:
             'color:#fff;border-radius: 3px;border:none;',
           textStyle: {
             color: '#fff',
             fontSize: 12, 
           }, 
         },
       series: [{
           data: [150, 230],
           type: 'bar'
       }]
   };
   ```
   ### What is actually happening?
   在tooltip生成的dom结点,文字颜色被固定为了:#6E7079 ,
   
   
   
对应源码中的:https://github.com/apache/incubator-echarts/blob/master/src/component/tooltip/tooltipMarkup.ts#L406
    
   
   ```js
   const TOOLTIP_NAME_TEXT_STYLE_CSS = 'font-size:12px;color:#6e7079';
   ```
   导致用户在extraCSStext或者 textStyle中定义的内容无法生效;
   
   ### 建议
   能否给tooltip加一个css,如 .echarts-tooltip,这样方便在css层自定义样式;
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to