dark-unica.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. /**
  2. * Dark theme for Highcharts JS
  3. * @author Torstein Honsi
  4. */
  5. // Load the fonts
  6. Highcharts.createElement('link', {
  7. //href: 'http://fonts.googleapis.com/css?family=Unica+One',
  8. href: '',
  9. rel: 'stylesheet',
  10. type: 'text/css'
  11. }, null, document.getElementsByTagName('head')[0]);
  12. Highcharts.theme = {
  13. colors: ["#2b908f", "#90ee7e", "#f45b5b", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
  14. "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
  15. chart: {
  16. backgroundColor: {
  17. linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
  18. stops: [
  19. [0, '#2a2a2b'],
  20. [1, '#3e3e40']
  21. ]
  22. },
  23. style: {
  24. fontFamily: "'Unica One', sans-serif"
  25. },
  26. plotBorderColor: '#606063'
  27. },
  28. title: {
  29. style: {
  30. color: '#E0E0E3',
  31. textTransform: 'uppercase',
  32. fontSize: '20px'
  33. }
  34. },
  35. subtitle: {
  36. style: {
  37. color: '#E0E0E3',
  38. textTransform: 'uppercase'
  39. }
  40. },
  41. xAxis: {
  42. gridLineColor: '#707073',
  43. labels: {
  44. style: {
  45. color: '#E0E0E3'
  46. }
  47. },
  48. lineColor: '#707073',
  49. minorGridLineColor: '#505053',
  50. tickColor: '#707073',
  51. title: {
  52. style: {
  53. color: '#A0A0A3'
  54. }
  55. }
  56. },
  57. yAxis: {
  58. gridLineColor: '#707073',
  59. labels: {
  60. style: {
  61. color: '#E0E0E3'
  62. }
  63. },
  64. lineColor: '#707073',
  65. minorGridLineColor: '#505053',
  66. tickColor: '#707073',
  67. tickWidth: 1,
  68. title: {
  69. style: {
  70. color: '#A0A0A3'
  71. }
  72. }
  73. },
  74. tooltip: {
  75. backgroundColor: 'rgba(0, 0, 0, 0.85)',
  76. style: {
  77. color: '#F0F0F0'
  78. }
  79. },
  80. plotOptions: {
  81. series: {
  82. dataLabels: {
  83. color: '#B0B0B3'
  84. },
  85. marker: {
  86. lineColor: '#333'
  87. }
  88. },
  89. boxplot: {
  90. fillColor: '#505053'
  91. },
  92. candlestick: {
  93. lineColor: 'white'
  94. },
  95. errorbar: {
  96. color: 'white'
  97. }
  98. },
  99. legend: {
  100. itemStyle: {
  101. color: '#E0E0E3'
  102. },
  103. itemHoverStyle: {
  104. color: '#FFF'
  105. },
  106. itemHiddenStyle: {
  107. color: '#606063'
  108. }
  109. },
  110. credits: {
  111. style: {
  112. color: '#666'
  113. }
  114. },
  115. labels: {
  116. style: {
  117. color: '#707073'
  118. }
  119. },
  120. drilldown: {
  121. activeAxisLabelStyle: {
  122. color: '#F0F0F3'
  123. },
  124. activeDataLabelStyle: {
  125. color: '#F0F0F3'
  126. }
  127. },
  128. navigation: {
  129. buttonOptions: {
  130. symbolStroke: '#DDDDDD',
  131. theme: {
  132. fill: '#505053'
  133. }
  134. }
  135. },
  136. // scroll charts
  137. rangeSelector: {
  138. buttonTheme: {
  139. fill: '#505053',
  140. stroke: '#000000',
  141. style: {
  142. color: '#CCC'
  143. },
  144. states: {
  145. hover: {
  146. fill: '#707073',
  147. stroke: '#000000',
  148. style: {
  149. color: 'white'
  150. }
  151. },
  152. select: {
  153. fill: '#000003',
  154. stroke: '#000000',
  155. style: {
  156. color: 'white'
  157. }
  158. }
  159. }
  160. },
  161. inputBoxBorderColor: '#505053',
  162. inputStyle: {
  163. backgroundColor: '#333',
  164. color: 'silver'
  165. },
  166. labelStyle: {
  167. color: 'silver'
  168. }
  169. },
  170. navigator: {
  171. handles: {
  172. backgroundColor: '#666',
  173. borderColor: '#AAA'
  174. },
  175. outlineColor: '#CCC',
  176. maskFill: 'rgba(255,255,255,0.1)',
  177. series: {
  178. color: '#7798BF',
  179. lineColor: '#A6C7ED'
  180. },
  181. xAxis: {
  182. gridLineColor: '#505053'
  183. }
  184. },
  185. scrollbar: {
  186. barBackgroundColor: '#808083',
  187. barBorderColor: '#808083',
  188. buttonArrowColor: '#CCC',
  189. buttonBackgroundColor: '#606063',
  190. buttonBorderColor: '#606063',
  191. rifleColor: '#FFF',
  192. trackBackgroundColor: '#404043',
  193. trackBorderColor: '#404043'
  194. },
  195. // special colors for some of the
  196. legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
  197. background2: '#505053',
  198. dataLabelsColor: '#B0B0B3',
  199. textColor: '#C0C0C0',
  200. contrastTextColor: '#F0F0F3',
  201. maskColor: 'rgba(255,255,255,0.3)'
  202. };
  203. // Apply the theme
  204. Highcharts.setOptions(Highcharts.theme);