macarons.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. (function (root, factory) {
  2. if (typeof define === 'function' && define.amd) {
  3. // AMD. Register as an anonymous module.
  4. define(['exports', 'echarts'], factory);
  5. } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
  6. // CommonJS
  7. factory(exports, require('echarts'));
  8. } else {
  9. // Browser globals
  10. factory({}, root.echarts);
  11. }
  12. }(this, function (exports, echarts) {
  13. var log = function (msg) {
  14. if (typeof console !== 'undefined') {
  15. console && console.error && console.error(msg);
  16. }
  17. };
  18. if (!echarts) {
  19. log('ECharts is not Loaded');
  20. return;
  21. }
  22. var colorPalette = [
  23. '#2ec7c9','#b6a2de','#5ab1ef','#ffb980','#d87a80',
  24. '#8d98b3','#e5cf0d','#97b552','#95706d','#dc69aa',
  25. '#07a2a4','#9a7fd1','#588dd5','#f5994e','#c05050',
  26. '#59678c','#c9ab00','#7eb00a','#6f5553','#c14089'
  27. ];
  28. var theme = {
  29. color: colorPalette,
  30. title: {
  31. textStyle: {
  32. fontWeight: 'normal',
  33. color: '#008acd'
  34. }
  35. },
  36. visualMap: {
  37. itemWidth: 15,
  38. color: ['#5ab1ef','#e0ffff']
  39. },
  40. toolbox: {
  41. iconStyle: {
  42. normal: {
  43. borderColor: colorPalette[0]
  44. }
  45. }
  46. },
  47. tooltip: {
  48. backgroundColor: 'rgba(50,50,50,0.5)',
  49. axisPointer : {
  50. type : 'line',
  51. lineStyle : {
  52. color: '#008acd'
  53. },
  54. crossStyle: {
  55. color: '#008acd'
  56. },
  57. shadowStyle : {
  58. color: 'rgba(200,200,200,0.2)'
  59. }
  60. }
  61. },
  62. dataZoom: {
  63. dataBackgroundColor: '#efefff',
  64. fillerColor: 'rgba(182,162,222,0.2)',
  65. handleColor: '#008acd'
  66. },
  67. grid: {
  68. borderColor: '#eee'
  69. },
  70. categoryAxis: {
  71. axisLine: {
  72. lineStyle: {
  73. color: '#008acd'
  74. }
  75. },
  76. splitLine: {
  77. lineStyle: {
  78. color: ['#eee']
  79. }
  80. }
  81. },
  82. valueAxis: {
  83. axisLine: {
  84. lineStyle: {
  85. color: '#008acd'
  86. }
  87. },
  88. splitArea : {
  89. show : true,
  90. areaStyle : {
  91. color: ['rgba(250,250,250,0.1)','rgba(200,200,200,0.1)']
  92. }
  93. },
  94. splitLine: {
  95. lineStyle: {
  96. color: ['#eee']
  97. }
  98. }
  99. },
  100. timeline : {
  101. lineStyle : {
  102. color : '#008acd'
  103. },
  104. controlStyle : {
  105. normal : { color : '#008acd'},
  106. emphasis : { color : '#008acd'}
  107. },
  108. symbol : 'emptyCircle',
  109. symbolSize : 3
  110. },
  111. line: {
  112. smooth : true,
  113. symbol: 'emptyCircle',
  114. symbolSize: 3
  115. },
  116. candlestick: {
  117. itemStyle: {
  118. normal: {
  119. color: '#d87a80',
  120. color0: '#2ec7c9',
  121. lineStyle: {
  122. color: '#d87a80',
  123. color0: '#2ec7c9'
  124. }
  125. }
  126. }
  127. },
  128. scatter: {
  129. symbol: 'circle',
  130. symbolSize: 4
  131. },
  132. map: {
  133. label: {
  134. normal: {
  135. textStyle: {
  136. color: '#d87a80'
  137. }
  138. }
  139. },
  140. itemStyle: {
  141. normal: {
  142. borderColor: '#eee',
  143. areaColor: '#ddd'
  144. },
  145. emphasis: {
  146. areaColor: '#fe994e'
  147. }
  148. }
  149. },
  150. graph: {
  151. color: colorPalette
  152. },
  153. gauge : {
  154. axisLine: {
  155. lineStyle: {
  156. color: [[0.2, '#2ec7c9'],[0.8, '#5ab1ef'],[1, '#d87a80']],
  157. width: 10
  158. }
  159. },
  160. axisTick: {
  161. splitNumber: 10,
  162. length :15,
  163. lineStyle: {
  164. color: 'auto'
  165. }
  166. },
  167. splitLine: {
  168. length :22,
  169. lineStyle: {
  170. color: 'auto'
  171. }
  172. },
  173. pointer : {
  174. width : 5
  175. }
  176. }
  177. };
  178. echarts.registerTheme('macarons', theme);
  179. }));