SandSignika.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* *
  2. *
  3. * (c) 2010-2021 Torstein Honsi
  4. *
  5. * License: www.highcharts.com/license
  6. *
  7. * Sand-Signika theme for Highcharts JS
  8. *
  9. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  10. *
  11. * */
  12. 'use strict';
  13. /* global document */
  14. import Highcharts from '../../Core/Globals.js';
  15. import U from '../../Core/Utilities.js';
  16. var addEvent = U.addEvent, createElement = U.createElement, setOptions = U.setOptions;
  17. // Load the fonts
  18. createElement('link', {
  19. href: 'https://fonts.googleapis.com/css?family=Signika:400,700',
  20. rel: 'stylesheet',
  21. type: 'text/css'
  22. }, null, document.getElementsByTagName('head')[0]);
  23. // Add the background image to the container
  24. addEvent(Highcharts.Chart, 'afterGetContainer', function () {
  25. // eslint-disable-next-line no-invalid-this
  26. this.container.style.background =
  27. 'url(https://www.highcharts.com/samples/graphics/sand.png)';
  28. });
  29. Highcharts.theme = {
  30. colors: ['#f45b5b', '#8085e9', '#8d4654', '#7798BF', '#aaeeee',
  31. '#ff0066', '#eeaaee', '#55BF3B', '#DF5353', '#7798BF', '#aaeeee'],
  32. chart: {
  33. backgroundColor: null,
  34. style: {
  35. fontFamily: 'Signika, serif'
  36. }
  37. },
  38. title: {
  39. style: {
  40. color: 'black',
  41. fontSize: '16px',
  42. fontWeight: 'bold'
  43. }
  44. },
  45. subtitle: {
  46. style: {
  47. color: 'black'
  48. }
  49. },
  50. tooltip: {
  51. borderWidth: 0
  52. },
  53. labels: {
  54. style: {
  55. color: '#6e6e70'
  56. }
  57. },
  58. legend: {
  59. backgroundColor: '#E0E0E8',
  60. itemStyle: {
  61. fontWeight: 'bold',
  62. fontSize: '13px'
  63. }
  64. },
  65. xAxis: {
  66. labels: {
  67. style: {
  68. color: '#6e6e70'
  69. }
  70. }
  71. },
  72. yAxis: {
  73. labels: {
  74. style: {
  75. color: '#6e6e70'
  76. }
  77. }
  78. },
  79. plotOptions: {
  80. series: {
  81. shadow: true
  82. },
  83. candlestick: {
  84. lineColor: '#404048'
  85. },
  86. map: {
  87. shadow: false
  88. }
  89. },
  90. // Highstock specific
  91. navigator: {
  92. xAxis: {
  93. gridLineColor: '#D0D0D8'
  94. }
  95. },
  96. rangeSelector: {
  97. buttonTheme: {
  98. fill: 'white',
  99. stroke: '#C0C0C8',
  100. 'stroke-width': 1,
  101. states: {
  102. select: {
  103. fill: '#D0D0D8'
  104. }
  105. }
  106. }
  107. },
  108. scrollbar: {
  109. trackBorderColor: '#C0C0C8'
  110. }
  111. };
  112. // Apply the theme
  113. setOptions(Highcharts.theme);