hxzt_qhyy.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. var dataAxis = ['点', '击', '柱', '子', '或', '者', '两', '指', '在', '触', '屏', '上', '滑', '动', '能', '够', '自', '动', '缩', '放'];
  2. var data = [50, 182, 191];
  3. var yMax = 200;
  4. var dataShadow = [];
  5. for (var i = 0; i < data.length; i++) {
  6. dataShadow.push(yMax);
  7. }
  8. option_hxzt_qhyy = {
  9. title: {
  10. text: '特性示例:渐变色 阴影 点击缩放',
  11. subtext: 'Feature Sample: Gradient Color, Shadow, Click Zoom'
  12. },
  13. xAxis: {
  14. data: dataAxis,
  15. axisLabel: {
  16. inside: true,
  17. textStyle: {
  18. color: '#ffff00'
  19. }
  20. },
  21. axisTick: {
  22. show: false
  23. },
  24. axisLine: {
  25. show: false
  26. },
  27. z: 10
  28. },
  29. yAxis: {
  30. axisLine: {
  31. show: false
  32. },
  33. axisTick: {
  34. show: false
  35. },
  36. axisLabel: {
  37. textStyle: {
  38. color: '#999'
  39. }
  40. }
  41. },
  42. dataZoom: [
  43. {
  44. type: 'inside'
  45. }
  46. ],
  47. series: [
  48. { // For shadow
  49. type: 'bar',
  50. itemStyle: {
  51. color: 'rgba(0,0,0,0.05)'
  52. },
  53. barGap: '-100%',
  54. barCategoryGap: '40%',
  55. data: dataShadow,
  56. animation: false
  57. },
  58. {
  59. type: 'bar',
  60. itemStyle: {
  61. color: new echarts.graphic.LinearGradient(
  62. 0, 0, 0, 1,
  63. [
  64. {offset: 0, color: '#83bff6'},
  65. {offset: 0.5, color: '#188df0'},
  66. {offset: 1, color: '#188df0'}
  67. ]
  68. )
  69. },
  70. emphasis: {
  71. itemStyle: {
  72. color: new echarts.graphic.LinearGradient(
  73. 0, 0, 0, 1,
  74. [
  75. {offset: 0, color: '#2378f7'},
  76. {offset: 0.7, color: '#2378f7'},
  77. {offset: 1, color: '#83bff6'}
  78. ]
  79. )
  80. }
  81. },
  82. data: data
  83. }
  84. ]
  85. };
  86. // Enable data zoom when user click bar.