macarons.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. (function (root, factory) {
  20. if (typeof define === 'function' && define.amd) {
  21. // AMD. Register as an anonymous module.
  22. define(['exports', 'echarts'], factory);
  23. } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
  24. // CommonJS
  25. factory(exports, require('echarts'));
  26. } else {
  27. // Browser globals
  28. factory({}, root.echarts);
  29. }
  30. }(this, function (exports, echarts) {
  31. var log = function (msg) {
  32. if (typeof console !== 'undefined') {
  33. console && console.error && console.error(msg);
  34. }
  35. };
  36. if (!echarts) {
  37. log('ECharts is not Loaded');
  38. return;
  39. }
  40. var colorPalette = [
  41. '#2ec7c9','#b6a2de','#5ab1ef','#ffb980','#d87a80',
  42. '#8d98b3','#e5cf0d','#97b552','#95706d','#dc69aa',
  43. '#07a2a4','#9a7fd1','#588dd5','#f5994e','#c05050',
  44. '#59678c','#c9ab00','#7eb00a','#6f5553','#c14089'
  45. ];
  46. var theme = {
  47. color: colorPalette,
  48. title: {
  49. textStyle: {
  50. fontWeight: 'normal',
  51. color: '#008acd'
  52. }
  53. },
  54. visualMap: {
  55. itemWidth: 15,
  56. color: ['#5ab1ef','#e0ffff']
  57. },
  58. toolbox: {
  59. iconStyle: {
  60. normal: {
  61. borderColor: colorPalette[0]
  62. }
  63. }
  64. },
  65. tooltip: {
  66. backgroundColor: 'rgba(50,50,50,0.5)',
  67. axisPointer : {
  68. type : 'line',
  69. lineStyle : {
  70. color: '#008acd'
  71. },
  72. crossStyle: {
  73. color: '#008acd'
  74. },
  75. shadowStyle : {
  76. color: 'rgba(200,200,200,0.2)'
  77. }
  78. }
  79. },
  80. dataZoom: {
  81. dataBackgroundColor: '#efefff',
  82. fillerColor: 'rgba(182,162,222,0.2)',
  83. handleColor: '#008acd'
  84. },
  85. grid: {
  86. borderColor: '#eee'
  87. },
  88. categoryAxis: {
  89. axisLine: {
  90. lineStyle: {
  91. color: '#008acd'
  92. }
  93. },
  94. splitLine: {
  95. lineStyle: {
  96. color: ['#eee']
  97. }
  98. }
  99. },
  100. valueAxis: {
  101. axisLine: {
  102. lineStyle: {
  103. color: '#008acd'
  104. }
  105. },
  106. splitArea : {
  107. show : true,
  108. areaStyle : {
  109. color: ['rgba(250,250,250,0.1)','rgba(200,200,200,0.1)']
  110. }
  111. },
  112. splitLine: {
  113. lineStyle: {
  114. color: ['#eee']
  115. }
  116. }
  117. },
  118. timeline : {
  119. lineStyle : {
  120. color : '#008acd'
  121. },
  122. controlStyle : {
  123. normal : { color : '#008acd'},
  124. emphasis : { color : '#008acd'}
  125. },
  126. symbol : 'emptyCircle',
  127. symbolSize : 3
  128. },
  129. line: {
  130. smooth : true,
  131. symbol: 'emptyCircle',
  132. symbolSize: 3
  133. },
  134. candlestick: {
  135. itemStyle: {
  136. normal: {
  137. color: '#d87a80',
  138. color0: '#2ec7c9',
  139. lineStyle: {
  140. color: '#d87a80',
  141. color0: '#2ec7c9'
  142. }
  143. }
  144. }
  145. },
  146. scatter: {
  147. symbol: 'circle',
  148. symbolSize: 4
  149. },
  150. map: {
  151. label: {
  152. normal: {
  153. textStyle: {
  154. color: '#d87a80'
  155. }
  156. }
  157. },
  158. itemStyle: {
  159. normal: {
  160. borderColor: '#eee',
  161. areaColor: '#ddd'
  162. },
  163. emphasis: {
  164. areaColor: '#fe994e'
  165. }
  166. }
  167. },
  168. graph: {
  169. color: colorPalette
  170. },
  171. gauge : {
  172. axisLine: {
  173. lineStyle: {
  174. color: [[0.2, '#2ec7c9'],[0.8, '#5ab1ef'],[1, '#d87a80']],
  175. width: 10
  176. }
  177. },
  178. axisTick: {
  179. splitNumber: 10,
  180. length :15,
  181. lineStyle: {
  182. color: 'auto'
  183. }
  184. },
  185. splitLine: {
  186. length :22,
  187. lineStyle: {
  188. color: 'auto'
  189. }
  190. },
  191. pointer : {
  192. width : 5
  193. }
  194. }
  195. };
  196. echarts.registerTheme('macarons', theme);
  197. }));