You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2019/06/12 05:42:48 UTC

[GitHub] [incubator-echarts] chengduHebiao opened a new issue #10659: 设置splitArea 中的areaStyle 里的color数组 在不同的浏览器显示的效果不同?

chengduHebiao opened a new issue #10659: 设置splitArea 中的areaStyle 里的color数组 在不同的浏览器显示的效果不同?
URL: https://github.com/apache/incubator-echarts/issues/10659
 
 
   ### Version
   4.2.1
   
   ### Steps to reproduce
   需求是这样的:想通过设置areaStyle的color数组来实现某个刻度的背景色,现在是在不同浏览器和不同电脑上出来的显示效果不同 
   
   ### What is expected?
   刻度颜色正确设置
   
   ### What is actually happening?
   刻度颜色显示在不同浏览器和机器呈现出错误
   
   下面是效果:
    
   ![image](https://user-images.githubusercontent.com/37444986/59326035-c9bece00-8d17-11e9-9244-e421aa8f2e56.png)
   ![image](https://user-images.githubusercontent.com/37444986/59326042-cfb4af00-8d17-11e9-80e2-b5d23c2ee382.png)
   
   需求是想让每个1月份的刻度颜色变深
   
   option:
   
    var backgroundColor = getBackGroundColor(result['data'][0] && result['data'][0].months);
               keywordTrendChart.setOption({
                   tooltip: {
                       axisPointer: {
                           type: 'cross',
                           label: {
                               backgroundColor: 'rgba(0, 0, 0, .7)'
                           }
                       },
                       padding: [15, 15],
                       backgroundColor: 'rgba(0, 0, 0, .7)'
                   },
                   legend: {
                       data: result['data'].map(function (item) {
                           return item.keyword;
                       }),
                       selectedMode: 'multiple'
                   },
                   xAxis: {
                       data: (function () {
                           return result['data'][0] && result['data'][0].months;
                       })(),
                       axisLabel: {
                           rotate: 60
                       },
                       splitArea: {
                           interval: 0,
                           show: true,
                           areaStyle: {
                               color: backgroundColor,
                           }
                       }
                   },
   
   
   
   <!-- This issue is generated by echarts-issue-helper. 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:
users@infra.apache.org


With regards,
Apache Git Services

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