123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- var dataAxis = ['点', '击', '柱', '子', '或', '者', '两', '指', '在', '触', '屏', '上', '滑', '动', '能', '够', '自', '动', '缩', '放'];
- var data = [50, 182, 191];
- var yMax = 200;
- var dataShadow = [];
- for (var i = 0; i < data.length; i++) {
- dataShadow.push(yMax);
- }
- option_hxzt_qhyy = {
- title: {
- text: '特性示例:渐变色 阴影 点击缩放',
- subtext: 'Feature Sample: Gradient Color, Shadow, Click Zoom'
- },
- xAxis: {
- data: dataAxis,
- axisLabel: {
- inside: true,
- textStyle: {
- color: '#ffff00'
- }
- },
- axisTick: {
- show: false
- },
- axisLine: {
- show: false
- },
- z: 10
- },
- yAxis: {
- axisLine: {
- show: false
- },
- axisTick: {
- show: false
- },
- axisLabel: {
- textStyle: {
- color: '#999'
- }
- }
- },
- dataZoom: [
- {
- type: 'inside'
- }
- ],
- series: [
- { // For shadow
- type: 'bar',
- itemStyle: {
- color: 'rgba(0,0,0,0.05)'
- },
- barGap: '-100%',
- barCategoryGap: '40%',
- data: dataShadow,
- animation: false
- },
- {
- type: 'bar',
- itemStyle: {
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1,
- [
- {offset: 0, color: '#83bff6'},
- {offset: 0.5, color: '#188df0'},
- {offset: 1, color: '#188df0'}
- ]
- )
- },
- emphasis: {
- itemStyle: {
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1,
- [
- {offset: 0, color: '#2378f7'},
- {offset: 0.7, color: '#2378f7'},
- {offset: 1, color: '#83bff6'}
- ]
- )
- }
- },
- data: data
- }
- ]
- };
- // Enable data zoom when user click bar.
|