您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

echarts之--柱状图-%显示

测试地址
https://www.echartsjs.com/examples/zh/editor.html?c=bar-tick-align
 var option = {
            title: {
              text: "存储条件(基本单位)",//
              padding: [12,4],1)">距离上下4px
              x: "center",1)">居中
              textStyle: {
                color: "#3398DB",1)">主的颜色
                fontSize: "18" 主的大小
              },},color: ['#3398DB'],tooltip : {
                trigger: 'axis',formatter:'{c}%',       这是关键,以百分比的形式
                axisPointer : {             坐标轴指示器,坐标轴触发有效
                    type : 'shadow'         认为直线,可选为:'line' | 'shadow'
                }
            },grid: {
                left: '3%''3%'true
            },xAxis : [
                {
                    type : 'category'
                    }
                }
            ],yAxis: [
                      {  
                                type: 'value''auto'  
                                    },show:   
                        }  
                    ],label: {
                                show: '{b}\n{c}%' 在柱状图的顶部出某个东西和这个东西的百分比值
                    },series : [
                {
                    name:'直接访问''60%']
                }
            ]
        };

测试地址
https:www.echartsjs.com/examples/zh/editor.html?c=bar-tick-a

 

 


联系我
置顶