博客
关于我
百度图表柱子背景颜色使用渐变效果
阅读量: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实现linear congruential generator线性同余发生器算法(附完整源码)
查看>>
Objective-C实现linear discriminant analysis线性判别分析算法(附完整源码)
查看>>
Objective-C实现linear regression线性回归算法(附完整源码)
查看>>
Objective-C实现linear search线性搜索算法(附完整源码)
查看>>
Objective-C实现Linear search线性搜索算法(附完整源码)
查看>>
Objective-C实现LinearSieve线性素数筛选算法 (附完整源码)
查看>>
Objective-C实现LinkedListNode链表节点类算法(附完整源码)
查看>>
Objective-C实现LinkedList链表算法(附完整源码)
查看>>
Objective-C实现local weighted learning局部加权学习算法(附完整源码)
查看>>
Objective-C实现logistic regression逻辑回归算法(附完整源码)
查看>>
Objective-C实现logistic sigmoid函数(附完整源码)
查看>>
Objective-C实现longest Common Substring最长公共子串算法(附完整源码)
查看>>
Objective-C实现longest increasing subsequence最长递增子序列算法(附完整源码)
查看>>
Objective-C实现longestCommonSubsequence最长公共子序列算法(附完整源码)
查看>>
Objective-C实现LongestIncreasingSubsequence最长递增子序列算法(附完整源码)
查看>>
Objective-C实现lorenz transformation 洛伦兹变换算法(附完整源码)
查看>>
Objective-C实现Lower-Upper Decomposition上下分解算法(附完整源码)
查看>>
Objective-C实现LowerCaseConversion小写转换算法(附完整源码)
查看>>
Objective-C实现lowest common ancestor最低共同祖先算法(附完整源码)
查看>>
Objective-C实现LRU 缓存算法(附完整源码)
查看>>