You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/10/29 11:59:44 UTC

[GitHub] [incubator-echarts] caiminghan opened a new issue #11513: itemStyle.color配置了linear渐变颜色,toolTip.formatter中获取的maker是错误的。

caiminghan opened a new issue #11513: itemStyle.color配置了linear渐变颜色,toolTip.formatter中获取的maker是错误的。
URL: https://github.com/apache/incubator-echarts/issues/11513
 
 
   <!--
   Please Use https://ecomfe.github.io/echarts-issue-helper to create the issue.
   Otherwise, it will be closed immediately.
   Questions in the form of *How to use ...* should be at Stack Overflow rather than GitHub issue list.
   
   请注意,所有 issue 必须由 https://ecomfe.github.io/echarts-issue-helper/ 创建,不然将会被直接关闭。建议使用英文提问。
   Issues 中不要问「如何使用 ECharts 实现……功能」的问题,相关问题请到 SegmentFault 或 Stack Overflow 提问,详见上面的链接。
   -->
   
   itemStyle.color配置了linear渐变颜色,如下:
   ```js
   ...
   color: {
             type: 'linear',
             x: 0,
             y: 0,
             x2: 0,
             y2: 1,
             colorStops: [
                 { offset: 0, color: 'rgba(156,107,211,0.5)' },
                 { offset: 0.2, color: 'rgba(156,107,211,0.3)' },
                 { offset: 1, color: 'rgba(156,107,211,0)' }
             ]
           }
   ...
   ```
   toolTip.formatter中获取的maker是错误的。对象直接转字符串,没有对对象类型,即渐变颜色做处理。获得到的marker如下:
   ```html
   <span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;
   background-color:[object Object];"></span>
   ```
   

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


With regards,
Apache Git Services

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