sand-signika.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /**
  2. * @license Highcharts JS v5.0.12 (2017-05-24)
  3. *
  4. * (c) 2009-2017 Torstein Honsi
  5. *
  6. * License: www.highcharts.com/license
  7. */
  8. 'use strict';
  9. function getContextPath() {
  10. var pathName = document.location.pathname;
  11. var index = pathName.substr(1).indexOf("/");
  12. var result = pathName.substr(0,index+1);
  13. result=result=="/myconsole"?"":result;
  14. return result;
  15. }
  16. (function(factory) {
  17. if (typeof module === 'object' && module.exports) {
  18. module.exports = factory;
  19. } else {
  20. factory(Highcharts);
  21. }
  22. }(function(Highcharts) {
  23. (function(Highcharts) {
  24. /**
  25. * (c) 2010-2017 Torstein Honsi
  26. *
  27. * License: www.highcharts.com/license
  28. *
  29. * Sand-Signika theme for Highcharts JS
  30. * @author Torstein Honsi
  31. */
  32. /* global document */
  33. // Load the fonts
  34. var conpath=getContextPath();
  35. Highcharts.createElement('link', {
  36. href: 'https://fonts.googleapis.com/css?family=Signika:400,700',
  37. rel: 'stylesheet',
  38. type: 'text/css'
  39. }, null, document.getElementsByTagName('head')[0]);
  40. // Add the background image to the container
  41. Highcharts.wrap(Highcharts.Chart.prototype, 'getContainer', function(proceed) {
  42. proceed.call(this);
  43. this.container.style.background = 'url('+conpath+'/assets/lib/ueditor/1.4.3/third-party/highcharts/images/sand.png)';
  44. });
  45. Highcharts.theme = {
  46. colors: ['#f45b5b', '#8085e9', '#8d4654', '#7798BF', '#aaeeee', '#ff0066', '#eeaaee',
  47. '#55BF3B', '#DF5353', '#7798BF', '#aaeeee'
  48. ],
  49. chart: {
  50. backgroundColor: null,
  51. style: {
  52. fontFamily: 'Signika, serif'
  53. }
  54. },
  55. title: {
  56. style: {
  57. color: 'black',
  58. fontSize: '16px',
  59. fontWeight: 'bold'
  60. }
  61. },
  62. subtitle: {
  63. style: {
  64. color: 'black'
  65. }
  66. },
  67. tooltip: {
  68. borderWidth: 0
  69. },
  70. legend: {
  71. itemStyle: {
  72. fontWeight: 'bold',
  73. fontSize: '13px'
  74. }
  75. },
  76. xAxis: {
  77. labels: {
  78. style: {
  79. color: '#6e6e70'
  80. }
  81. }
  82. },
  83. yAxis: {
  84. labels: {
  85. style: {
  86. color: '#6e6e70'
  87. }
  88. }
  89. },
  90. plotOptions: {
  91. series: {
  92. shadow: true
  93. },
  94. candlestick: {
  95. lineColor: '#404048'
  96. },
  97. map: {
  98. shadow: false
  99. }
  100. },
  101. // Highstock specific
  102. navigator: {
  103. xAxis: {
  104. gridLineColor: '#D0D0D8'
  105. }
  106. },
  107. rangeSelector: {
  108. buttonTheme: {
  109. fill: 'white',
  110. stroke: '#C0C0C8',
  111. 'stroke-width': 1,
  112. states: {
  113. select: {
  114. fill: '#D0D0D8'
  115. }
  116. }
  117. }
  118. },
  119. scrollbar: {
  120. trackBorderColor: '#C0C0C8'
  121. },
  122. // General
  123. background2: '#E0E0E8'
  124. };
  125. // Apply the theme
  126. Highcharts.setOptions(Highcharts.theme);
  127. }(Highcharts));
  128. }));