zoukankan      html  css  js  c++  java
  • 大数据-图表插件-echarts 样式修改(迭代)

    修改折线图大小

                 myChart.setOption({  

                    title:{
                        text:"价格指数"
                    },
                    grid:{
                        x:25,    
                        y:45,
                        x2:5,
                        y2:20,
                        borderWidth:1
                    },
                    ....
     
    饼图修改颜色
    1. option = {  
    2.         title : {  
    3.         text: '全局指标状态分布图',  
    4.                x:'left',  
    5.                y:'top'  
    6.         },  
    7.         tooltip : {  
    8.                show: true,  
    9.                formatter: "{a} <br/>{b} : {c} ({d}%)"  
    10.         },  
    11.         color:['red', 'green','yellow','blueviolet']  
    12. }

     tooltip 提示换行

        itemStyle: {
                 normal:{
                     label:{
                     show:true,
                     formatter: '{b} : {c} ({d}%)'
                   },
                   labelLine:{
                   show:true
                   }

                 },

    修改 X 轴,Y 轴 颜色,粗细

    xAxis : [
                    {
                        type : 'category',
                        data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],    
                        //设置轴线的属性
                        axisLine:{
                            lineStyle:{
                                color:'#FF0000',
                                8,//这里是为了突出显示加上的
                            }
                        } 
                    }
                ],
                yAxis : [
                    {
                        type : 'value',
                        //设置轴线的属性
                        axisLine:{
                            lineStyle:{
                                color:'#00FF00',
                                8,//这里是为了突出显示加上的
                            }
                        } 
                    }
  • 相关阅读:
    助理需要看的书
    linux 磁盘管理以及维护
    转:工作与创业区别
    《编写可读代码的艺术》---把控制流变得可读
    Visual studio插件 Reshaper--- 常用快捷键
    为啥我喜欢在Windows 7环境下做Unity开发?
    《编写可读代码的艺术》---写出言简意赅的注释
    《编写可读代码的艺术》---该写什么样的注释
    《编写可读代码的艺术》---美观代码
    《编写可读代码的艺术》---不会误解的名字
  • 原文地址:https://www.cnblogs.com/hai-cheng/p/7284146.html
Copyright © 2011-2022 走看看