博客
关于我
百度图表柱子背景颜色使用渐变效果
阅读量:132 次
发布时间:2019-02-26

本文共 2882 字,大约阅读时间需要 9 分钟。

??????

?????????????ECharts???????????????????????????????????????????????

???????????????????????ECharts????????????????????????????????????????????????????????????????

????

??????????

var app = echarts.init(document.getElementById("box"));  var option = {      title: {          text: '?????',          left: '50%'      },      tooltip: {          trigger: 'axis'      },      legend: {          type: 'plain',          data: ['2011?', '2012?', '2013?'],          bottom: '0px'      },      grid: {          left: '0%',          right: '4%',          bottom: '10%',          top: '15%',          containLabel: true      },      xAxis: {          type: 'value',          data: [2000, 3900, 8000],          onZero: false      },      yAxis: {          type: 'category',          data: [],          show: false      },      series: [          {              name: '2011?',              type: 'bar',              data: [2000],              itemStyle: {                  normal: {                      color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [                          { offset: 0, color: '#fff' },                          { offset: 1, color: '#B0B0B0' }                      ])                  }              },              barWidth: '20px',              label: {                  normal: {                      show: true,                      position: 'insideRight',                      color: '#333'                  }              }          },          {              name: '2012?',              type: 'bar',              data: [3900],              itemStyle: {                  normal: {                      color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [                          { offset: 0, color: '#fff' },                          { offset: 1, color: '#EF8945' }                      ])                  }              },              barWidth: '20px',              label: {                  normal: {                      show: true,                      position: 'insideRight',                      color: '#333'                  }              }          },          {              name: '2013?',              type: 'bar',              data: [8000],              itemStyle: {                  normal: {                      color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [                          { offset: 0, color: '#fff' },                          { offset: 1, color: '#6EA6DA' }                      ])                  }              },              barWidth: '20px',              label: {                  normal: {                      show: true,                      position: 'insideRight',                      color: '#333'                  }              }          }      ]  };  app.setOption(option);

????????????????????????????????????????????????????????ECharts?????????????????????????????????????????????????????

转载地址:http://iovf.baihongyu.com/

你可能感兴趣的文章
Objective-C实现判断一个数是否为质数算法(附完整源码)
查看>>
Objective-C实现判断三角形的类型(附完整源码)
查看>>
Objective-C实现判断位是不是偶数isEven算法(附完整源码)
查看>>
Objective-C实现判断字符串是否包含特殊字符算法(附完整源码)
查看>>
Objective-C实现判断字符串是否回文palindrome算法(附完整源码)
查看>>
Objective-C实现判断数是否为质数(附完整源码)
查看>>
Objective-C实现判断整数是否为2的幂isPowerOfTwo算法(附完整源码)
查看>>
Objective-C实现判断是否为回文字符串(附完整源码)
查看>>
Objective-C实现判断是否为回文数算法(附完整源码)
查看>>
Objective-C实现判断正整数n的d进制数表示形式是否是回文数(附完整源码)
查看>>
Objective-C实现判断闰年(附完整源码)
查看>>
Objective-C实现利用stack对输入的式子进行计算算法(附完整源码)
查看>>
Objective-C实现前缀Knuth–Morris–Pratt 算法(附完整源码)
查看>>
Objective-C实现加密哈希SHA-1 算法(附完整源码)
查看>>
Objective-C实现勒让德多项式(附完整源码)
查看>>
Objective-C实现区域生长法(附完整源码)
查看>>
Objective-C实现十六进制转二进制算法(附完整源码)
查看>>
Objective-C实现十六进制转十进制算法(附完整源码)
查看>>
Objective-C实现十进制转N进制算法(附完整源码)
查看>>
Objective-C实现十进制转二进制(附完整源码)
查看>>