sand-signika.js 2.3 KB

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