shine.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. (function (root, factory) {if (typeof define === 'function' && define.amd) {
  2. // AMD. Register as an anonymous module.
  3. define(['exports', 'echarts'], factory);
  4. } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
  5. // CommonJS
  6. factory(exports, require('echarts'));
  7. } else {
  8. // Browser globals
  9. factory({}, root.echarts);
  10. }
  11. }(this, function (exports, echarts) {
  12. var log = function (msg) {
  13. if (typeof console !== 'undefined') {
  14. console && console.error && console.error(msg);
  15. }
  16. };
  17. if (!echarts) {
  18. log('ECharts is not Loaded');
  19. return;
  20. }
  21. var colorPalette = [
  22. // '#c12e34','#e6b600','#0098d9','#2b821d',
  23. "#9acd32",'#4f94cd','#fe8d03','#ee807f',
  24. '#005eaa','#339ca8','#cda819','#32a487'
  25. ];
  26. var theme = {
  27. color: colorPalette,
  28. title: {
  29. textStyle: {
  30. fontWeight: 'normal'
  31. }
  32. },
  33. visualMap: {
  34. color:['#1790cf','#a2d4e6']
  35. },
  36. toolbox: {
  37. iconStyle: {
  38. normal: {
  39. borderColor: '#06467c'
  40. }
  41. }
  42. },
  43. tooltip: {
  44. backgroundColor: 'rgba(0,0,0,0.6)'
  45. },
  46. dataZoom: {
  47. dataBackgroundColor: '#dedede',
  48. fillerColor: 'rgba(154,217,247,0.2)',
  49. handleColor: '#005eaa'
  50. },
  51. timeline: {
  52. lineStyle: {
  53. color: '#005eaa'
  54. },
  55. controlStyle: {
  56. normal: {
  57. color: '#005eaa',
  58. borderColor: '#005eaa'
  59. }
  60. }
  61. },
  62. candlestick: {
  63. itemStyle: {
  64. normal: {
  65. color: '#c12e34',
  66. color0: '#2b821d',
  67. lineStyle: {
  68. width: 1,
  69. color: '#c12e34',
  70. color0: '#2b821d'
  71. }
  72. }
  73. }
  74. },
  75. graph: {
  76. color: colorPalette
  77. },
  78. map: {
  79. label: {
  80. normal: {
  81. textStyle: {
  82. color: '#c12e34'
  83. }
  84. },
  85. emphasis: {
  86. textStyle: {
  87. color: '#c12e34'
  88. }
  89. }
  90. },
  91. itemStyle: {
  92. normal: {
  93. borderColor: '#eee',
  94. areaColor: '#ddd'
  95. },
  96. emphasis: {
  97. areaColor: '#e6b600'
  98. }
  99. }
  100. },
  101. gauge: {
  102. axisLine: {
  103. show: true,
  104. lineStyle: {
  105. color: [[0.2, '#2b821d'],[0.8, '#005eaa'],[1, '#c12e34']],
  106. width: 5
  107. }
  108. },
  109. axisTick: {
  110. splitNumber: 10,
  111. length:8,
  112. lineStyle: {
  113. color: 'auto'
  114. }
  115. },
  116. axisLabel: {
  117. textStyle: {
  118. color: 'auto'
  119. }
  120. },
  121. splitLine: {
  122. length: 12,
  123. lineStyle: {
  124. color: 'auto'
  125. }
  126. },
  127. pointer: {
  128. length: '90%',
  129. width: 3,
  130. color: 'auto'
  131. },
  132. title: {
  133. textStyle: {
  134. color: '#333'
  135. }
  136. },
  137. detail: {
  138. textStyle: {
  139. color: 'auto'
  140. }
  141. }
  142. }
  143. };
  144. echarts.registerTheme('shine', theme);
  145. }));