echarts-theme-shine.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. '#005eaa','#339ca8','#cda819','#32a487'
  24. ];
  25. var theme = {
  26. color: colorPalette,
  27. title: {
  28. textStyle: {
  29. fontWeight: 'normal'
  30. }
  31. },
  32. visualMap: {
  33. color:['#1790cf','#a2d4e6']
  34. },
  35. toolbox: {
  36. iconStyle: {
  37. normal: {
  38. borderColor: '#06467c'
  39. }
  40. }
  41. },
  42. tooltip: {
  43. backgroundColor: 'rgba(0,0,0,0.6)'
  44. },
  45. dataZoom: {
  46. dataBackgroundColor: '#dedede',
  47. fillerColor: 'rgba(154,217,247,0.2)',
  48. handleColor: '#005eaa'
  49. },
  50. timeline: {
  51. lineStyle: {
  52. color: '#005eaa'
  53. },
  54. controlStyle: {
  55. normal: {
  56. color: '#005eaa',
  57. borderColor: '#005eaa'
  58. }
  59. }
  60. },
  61. candlestick: {
  62. itemStyle: {
  63. normal: {
  64. color: '#c12e34',
  65. color0: '#2b821d',
  66. lineStyle: {
  67. width: 1,
  68. color: '#c12e34',
  69. color0: '#2b821d'
  70. }
  71. }
  72. }
  73. },
  74. graph: {
  75. color: colorPalette
  76. },
  77. map: {
  78. label: {
  79. normal: {
  80. textStyle: {
  81. color: '#c12e34'
  82. }
  83. },
  84. emphasis: {
  85. textStyle: {
  86. color: '#c12e34'
  87. }
  88. }
  89. },
  90. itemStyle: {
  91. normal: {
  92. borderColor: '#eee',
  93. areaColor: '#ddd'
  94. },
  95. emphasis: {
  96. areaColor: '#e6b600'
  97. }
  98. }
  99. },
  100. gauge: {
  101. axisLine: {
  102. show: true,
  103. lineStyle: {
  104. color: [[0.2, '#2b821d'],[0.8, '#005eaa'],[1, '#c12e34']],
  105. width: 5
  106. }
  107. },
  108. axisTick: {
  109. splitNumber: 10,
  110. length:8,
  111. lineStyle: {
  112. color: 'auto'
  113. }
  114. },
  115. axisLabel: {
  116. textStyle: {
  117. color: 'auto'
  118. }
  119. },
  120. splitLine: {
  121. length: 12,
  122. lineStyle: {
  123. color: 'auto'
  124. }
  125. },
  126. pointer: {
  127. length: '90%',
  128. width: 3,
  129. color: 'auto'
  130. },
  131. title: {
  132. textStyle: {
  133. color: '#333'
  134. }
  135. },
  136. detail: {
  137. textStyle: {
  138. color: 'auto'
  139. }
  140. }
  141. }
  142. };
  143. echarts.registerTheme('shine', theme);
  144. }));