shine.js 4.5 KB

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