grid.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /**
  2. * (c) 2010-2019 Torstein Honsi
  3. *
  4. * License: www.highcharts.com/license
  5. *
  6. * Grid theme for Highcharts JS
  7. * @author Torstein Honsi
  8. */
  9. 'use strict';
  10. import Highcharts from '../parts/Globals.js';
  11. Highcharts.theme = {
  12. colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572',
  13. '#FF9655', '#FFF263', '#6AF9C4'],
  14. chart: {
  15. backgroundColor: {
  16. linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
  17. stops: [
  18. [0, 'rgb(255, 255, 255)'],
  19. [1, 'rgb(240, 240, 255)']
  20. ]
  21. },
  22. borderWidth: 2,
  23. plotBackgroundColor: 'rgba(255, 255, 255, .9)',
  24. plotShadow: true,
  25. plotBorderWidth: 1
  26. },
  27. title: {
  28. style: {
  29. color: '#000',
  30. font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
  31. }
  32. },
  33. subtitle: {
  34. style: {
  35. color: '#666666',
  36. font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
  37. }
  38. },
  39. xAxis: {
  40. gridLineWidth: 1,
  41. lineColor: '#000',
  42. tickColor: '#000',
  43. labels: {
  44. style: {
  45. color: '#000',
  46. font: '11px Trebuchet MS, Verdana, sans-serif'
  47. }
  48. },
  49. title: {
  50. style: {
  51. color: '#333',
  52. fontWeight: 'bold',
  53. fontSize: '12px',
  54. fontFamily: 'Trebuchet MS, Verdana, sans-serif'
  55. }
  56. }
  57. },
  58. yAxis: {
  59. minorTickInterval: 'auto',
  60. lineColor: '#000',
  61. lineWidth: 1,
  62. tickWidth: 1,
  63. tickColor: '#000',
  64. labels: {
  65. style: {
  66. color: '#000',
  67. font: '11px Trebuchet MS, Verdana, sans-serif'
  68. }
  69. },
  70. title: {
  71. style: {
  72. color: '#333',
  73. fontWeight: 'bold',
  74. fontSize: '12px',
  75. fontFamily: 'Trebuchet MS, Verdana, sans-serif'
  76. }
  77. }
  78. },
  79. legend: {
  80. itemStyle: {
  81. font: '9pt Trebuchet MS, Verdana, sans-serif',
  82. color: 'black'
  83. },
  84. itemHoverStyle: {
  85. color: '#039'
  86. },
  87. itemHiddenStyle: {
  88. color: 'gray'
  89. }
  90. },
  91. labels: {
  92. style: {
  93. color: '#99b'
  94. }
  95. },
  96. navigation: {
  97. buttonOptions: {
  98. theme: {
  99. stroke: '#CCCCCC'
  100. }
  101. }
  102. }
  103. };
  104. // Apply the theme
  105. Highcharts.setOptions(Highcharts.theme);