dark.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. /*
  20. * Licensed to the Apache Software Foundation (ASF) under one
  21. * or more contributor license agreements. See the NOTICE file
  22. * distributed with this work for additional information
  23. * regarding copyright ownership. The ASF licenses this file
  24. * to you under the Apache License, Version 2.0 (the
  25. * "License"); you may not use this file except in compliance
  26. * with the License. You may obtain a copy of the License at
  27. *
  28. * http://www.apache.org/licenses/LICENSE-2.0
  29. *
  30. * Unless required by applicable law or agreed to in writing,
  31. * software distributed under the License is distributed on an
  32. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  33. * KIND, either express or implied. See the License for the
  34. * specific language governing permissions and limitations
  35. * under the License.
  36. */
  37. var contrastColor = '#eee';
  38. var axisCommon = function () {
  39. return {
  40. axisLine: {
  41. lineStyle: {
  42. color: contrastColor
  43. }
  44. },
  45. axisTick: {
  46. lineStyle: {
  47. color: contrastColor
  48. }
  49. },
  50. axisLabel: {
  51. textStyle: {
  52. color: contrastColor
  53. }
  54. },
  55. splitLine: {
  56. lineStyle: {
  57. type: 'dashed',
  58. color: '#aaa'
  59. }
  60. },
  61. splitArea: {
  62. areaStyle: {
  63. color: contrastColor
  64. }
  65. }
  66. };
  67. };
  68. var colorPalette = ['#dd6b66', '#759aa0', '#e69d87', '#8dc1a9', '#ea7e53', '#eedd78', '#73a373', '#73b9bc', '#7289ab', '#91ca8c', '#f49f42'];
  69. var theme = {
  70. color: colorPalette,
  71. backgroundColor: '#333',
  72. tooltip: {
  73. axisPointer: {
  74. lineStyle: {
  75. color: contrastColor
  76. },
  77. crossStyle: {
  78. color: contrastColor
  79. },
  80. label: {
  81. color: '#000'
  82. }
  83. }
  84. },
  85. legend: {
  86. textStyle: {
  87. color: contrastColor
  88. }
  89. },
  90. textStyle: {
  91. color: contrastColor
  92. },
  93. title: {
  94. textStyle: {
  95. color: contrastColor
  96. }
  97. },
  98. toolbox: {
  99. iconStyle: {
  100. normal: {
  101. borderColor: contrastColor
  102. }
  103. }
  104. },
  105. dataZoom: {
  106. textStyle: {
  107. color: contrastColor
  108. }
  109. },
  110. visualMap: {
  111. textStyle: {
  112. color: contrastColor
  113. }
  114. },
  115. timeline: {
  116. lineStyle: {
  117. color: contrastColor
  118. },
  119. itemStyle: {
  120. normal: {
  121. color: colorPalette[1]
  122. }
  123. },
  124. label: {
  125. normal: {
  126. textStyle: {
  127. color: contrastColor
  128. }
  129. }
  130. },
  131. controlStyle: {
  132. normal: {
  133. color: contrastColor,
  134. borderColor: contrastColor
  135. }
  136. }
  137. },
  138. timeAxis: axisCommon(),
  139. logAxis: axisCommon(),
  140. valueAxis: axisCommon(),
  141. categoryAxis: axisCommon(),
  142. line: {
  143. symbol: 'circle'
  144. },
  145. graph: {
  146. color: colorPalette
  147. },
  148. gauge: {
  149. title: {
  150. textStyle: {
  151. color: contrastColor
  152. }
  153. }
  154. },
  155. candlestick: {
  156. itemStyle: {
  157. normal: {
  158. color: '#FD1050',
  159. color0: '#0CF49B',
  160. borderColor: '#FD1050',
  161. borderColor0: '#0CF49B'
  162. }
  163. }
  164. }
  165. };
  166. theme.categoryAxis.splitLine.show = false;
  167. var _default = theme;
  168. module.exports = _default;