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,//这里是为了突出显示加上的
                            }
                        } 
                    }
  • 相关阅读:
    Spring+SpringMVC+MyBatis+easyUI整合
    @RequestMapping 用法详解之地址映射(转)
    Servlet的5种方式实现表单提交
    activiti 快速入门--组任务(candidate users)分配(6)
    activiti数据库表结构剖析
    Java程序如何生成Jar、exe及安装文件
    StringEscapeUtils对字符串进行各种转义与反转义
    30分钟学会如何使用Shiro
    Java基础恶补——内存泄露、内存溢出
    ashx文件结合ajax使用(返回json数据)
  • 原文地址:https://www.cnblogs.com/hai-cheng/p/7284146.html
Copyright © 2011-2022 走看看