highstock-rails 2.1.10 → 5.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/css/highcharts.css +760 -0
  3. data/app/assets/javascripts/highstock.js +511 -419
  4. data/app/assets/javascripts/highstock/highstock.js +472 -0
  5. data/app/assets/javascripts/highstock/highstock.js.map +8 -0
  6. data/app/assets/javascripts/highstock/highstock.src.js +28809 -0
  7. data/app/assets/javascripts/highstock/modules/accessibility.js +48 -0
  8. data/app/assets/javascripts/highstock/modules/accessibility.js.map +8 -0
  9. data/app/assets/javascripts/highstock/modules/accessibility.src.js +1131 -0
  10. data/app/assets/javascripts/highstock/modules/annotations.js +14 -0
  11. data/app/assets/javascripts/highstock/modules/annotations.js.map +8 -0
  12. data/app/assets/javascripts/highstock/modules/annotations.src.js +407 -0
  13. data/app/assets/javascripts/highstock/modules/boost-canvas.js +23 -0
  14. data/app/assets/javascripts/highstock/modules/boost-canvas.js.map +8 -0
  15. data/app/assets/javascripts/highstock/modules/boost-canvas.src.js +771 -0
  16. data/app/assets/javascripts/highstock/modules/boost.js +51 -12
  17. data/app/assets/javascripts/highstock/modules/boost.js.map +8 -0
  18. data/app/assets/javascripts/highstock/modules/boost.src.js +2580 -492
  19. data/app/assets/javascripts/highstock/modules/broken-axis.js.map +8 -0
  20. data/app/assets/javascripts/highstock/modules/canvasrenderer.experimental.js.map +8 -0
  21. data/app/assets/javascripts/highstock/modules/data.js +19 -19
  22. data/app/assets/javascripts/highstock/modules/data.js.map +8 -0
  23. data/app/assets/javascripts/highstock/modules/data.src.js +974 -950
  24. data/app/assets/javascripts/highstock/modules/drilldown.js +25 -17
  25. data/app/assets/javascripts/highstock/modules/drilldown.js.map +8 -0
  26. data/app/assets/javascripts/highstock/modules/drilldown.src.js +790 -709
  27. data/app/assets/javascripts/highstock/modules/export-data.js +17 -0
  28. data/app/assets/javascripts/highstock/modules/export-data.js.map +8 -0
  29. data/app/assets/javascripts/highstock/modules/export-data.src.js +417 -0
  30. data/app/assets/javascripts/highstock/modules/exporting.js +21 -18
  31. data/app/assets/javascripts/highstock/modules/exporting.js.map +8 -0
  32. data/app/assets/javascripts/highstock/modules/exporting.src.js +1013 -768
  33. data/app/assets/javascripts/highstock/modules/funnel.js +6 -7
  34. data/app/assets/javascripts/highstock/modules/funnel.js.map +8 -0
  35. data/app/assets/javascripts/highstock/modules/funnel.src.js +284 -308
  36. data/app/assets/javascripts/highstock/modules/gantt.js +24 -0
  37. data/app/assets/javascripts/highstock/modules/gantt.js.map +8 -0
  38. data/app/assets/javascripts/highstock/modules/gantt.src.js +793 -0
  39. data/app/assets/javascripts/highstock/modules/grid-axis.js +19 -0
  40. data/app/assets/javascripts/highstock/modules/grid-axis.js.map +8 -0
  41. data/app/assets/javascripts/highstock/modules/grid-axis.src.js +545 -0
  42. data/app/assets/javascripts/highstock/modules/heatmap.js +20 -18
  43. data/app/assets/javascripts/highstock/modules/heatmap.js.map +8 -0
  44. data/app/assets/javascripts/highstock/modules/heatmap.src.js +738 -633
  45. data/app/assets/javascripts/highstock/modules/map-parser.js.map +8 -0
  46. data/app/assets/javascripts/highstock/modules/map.js.map +8 -0
  47. data/app/assets/javascripts/highstock/modules/no-data-to-display.js +5 -5
  48. data/app/assets/javascripts/highstock/modules/no-data-to-display.js.map +8 -0
  49. data/app/assets/javascripts/highstock/modules/no-data-to-display.src.js +140 -133
  50. data/app/assets/javascripts/highstock/modules/offline-exporting.js +12 -7
  51. data/app/assets/javascripts/highstock/modules/offline-exporting.js.map +8 -0
  52. data/app/assets/javascripts/highstock/modules/offline-exporting.src.js +543 -270
  53. data/app/assets/javascripts/highstock/modules/overlapping-datalabels.js +10 -0
  54. data/app/assets/javascripts/highstock/modules/overlapping-datalabels.js.map +8 -0
  55. data/app/assets/javascripts/highstock/modules/overlapping-datalabels.src.js +187 -0
  56. data/app/assets/javascripts/highstock/modules/series-label.js +19 -0
  57. data/app/assets/javascripts/highstock/modules/series-label.js.map +8 -0
  58. data/app/assets/javascripts/highstock/modules/series-label.src.js +606 -0
  59. data/app/assets/javascripts/highstock/modules/solid-gauge.js +9 -8
  60. data/app/assets/javascripts/highstock/modules/solid-gauge.js.map +8 -0
  61. data/app/assets/javascripts/highstock/modules/solid-gauge.src.js +334 -266
  62. data/app/assets/javascripts/highstock/modules/static-scale.js +12 -0
  63. data/app/assets/javascripts/highstock/modules/static-scale.js.map +8 -0
  64. data/app/assets/javascripts/highstock/modules/static-scale.src.js +64 -0
  65. data/app/assets/javascripts/highstock/modules/stock.js +123 -0
  66. data/app/assets/javascripts/highstock/modules/stock.js.map +8 -0
  67. data/app/assets/javascripts/highstock/modules/stock.src.js +6247 -0
  68. data/app/assets/javascripts/highstock/modules/treemap.js +22 -23
  69. data/app/assets/javascripts/highstock/modules/treemap.js.map +8 -0
  70. data/app/assets/javascripts/highstock/modules/treemap.src.js +884 -859
  71. data/app/assets/javascripts/highstock/modules/xrange-series.js +15 -0
  72. data/app/assets/javascripts/highstock/modules/xrange-series.js.map +8 -0
  73. data/app/assets/javascripts/highstock/modules/xrange-series.src.js +258 -0
  74. data/app/assets/javascripts/highstock/themes/dark-blue.js +307 -244
  75. data/app/assets/javascripts/highstock/themes/dark-green.js +303 -244
  76. data/app/assets/javascripts/highstock/themes/dark-unica.js +231 -201
  77. data/app/assets/javascripts/highstock/themes/gray.js +314 -245
  78. data/app/assets/javascripts/highstock/themes/grid-light.js +91 -66
  79. data/app/assets/javascripts/highstock/themes/grid.js +124 -96
  80. data/app/assets/javascripts/highstock/themes/sand-signika.js +119 -94
  81. data/app/assets/javascripts/highstock/themes/skies.js +108 -85
  82. data/lib/highstock/rails/version.rb +1 -1
  83. metadata +54 -11
  84. data/app/assets/javascripts/highstock/adapters/standalone-framework.js +0 -18
  85. data/app/assets/javascripts/highstock/adapters/standalone-framework.src.js +0 -635
  86. data/app/assets/javascripts/highstock/highcharts-3d.js +0 -48
  87. data/app/assets/javascripts/highstock/highcharts-3d.src.js +0 -1711
  88. data/app/assets/javascripts/highstock/highcharts-more.js +0 -55
  89. data/app/assets/javascripts/highstock/highstock-all.js +0 -637
  90. data/app/assets/javascripts/highstock/modules/canvas-tools.js +0 -133
  91. data/app/assets/javascripts/highstock/modules/canvas-tools.src.js +0 -3114
@@ -0,0 +1,8 @@
1
+ {
2
+ "version":3,
3
+ "file":"",
4
+ "lineCount":27,
5
+ "mappings":"A;;;;;;;;AASC,SAAQ,CAACA,CAAD,CAAU,CACO,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,CACID,MAAAC,QADJ,CACqBF,CADrB,CAGIA,CAAA,CAAQG,UAAR,CAJW,CAAlB,CAAA,CAMC,QAAQ,CAACA,CAAD,CAAa,CAClB,SAAQ,CAACC,CAAD,CAAI,CAAA,IAYLC,EAAiBD,CAAAC,eAZZ,CAaLC,EAAMF,CAAAE,IAbD,CAcLC,EAAQH,CAAAG,MAdH,CAeLC,EAAWJ,CAAAI,SAfN,CAgBLC,EAAcL,CAAAK,YAhBT,CAiBLC,EAAYN,CAAAM,UAjBP,CAkBLC,EAAgBP,CAAAO,cAlBX,CAmBLC,EAAiBR,CAAAQ,eAnBZ,CAoBLC,EAAMT,CAAAS,IApBD,CAqBLC,EAAQV,CAAAU,MArBH,CAsBLC,EAAOX,CAAAW,KAtBF,CAuBLC,EAAOZ,CAAAY,KAvBF,CAwBLC,EAAab,CAAAa,WAxBR,CAyBLC,EAASd,CAAAc,OAzBJ,CA2BLC,EAAMf,CAAAe,IA3BD,CA4BLC,EAAchB,CAAAgB,YA5BT,CA8BLC,EAAUjB,CAAAkB,SAAAC,UAAAF,QAGdH,EAAA,CAAOb,CAAAmB,KAAP,CAA4B,CACxBC,WAAY,aADY,CAExBC,YAAa,oBAFW,CAGxBC,aAAc,qBAHU,CAIxBC,YAAa,uBAJW,CAKxBC,YAAa,2BALW;AAMxBC,mBAAoB,oBANI,CAA5B,CAWAzB,EAAA0B,WAAA,CAA4B,CACxBC,cAAe,CACXC,MAAO,EADI,CAEXC,WAAY,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A5C,GAAehH,CAAA9B,QAAf,GACI9B,CAAA+F,aAMA,CANqB,EAMrB,CAJA7J,CAAA,CAAW8B,CAAX,CAAoB,QAAQ,CAACmH,CAAD,CAAS,CACjCnF,CAAAoH,UAAA,CAAgBjC,CAAhB,CADiC,CAArC,CAIA,CAAAnF,CAAA6K,iBAAA,CAAyB,CAAA,CAP7B,CAWApP,EAAA,CAASuE,CAAT,CAAgB,SAAhB,CAA2BA,CAAAoI,cAA3B,CAtByC,CAyB7C5M,EAAAgB,UAAAsO,UAAAxI,KAAA,CAA+B,QAAQ,CAACtC,CAAD,CAAQ,CAW3CA,CAAA0K,gBAAA,EAEAjP;CAAA,CAASuE,CAAT,CAAgB,QAAhB,CAA0BA,CAAA0K,gBAA1B,CAIAzO,EAAA,CAAK,CAAC,WAAD,CAAc,YAAd,CAAL,CAAkC,QAAQ,CAAC+M,CAAD,CAAO,CAC7ChJ,CAAA,CAAMgJ,CAAN,CAAA,CAAc,CACVlG,OAAQA,QAAQ,CAAClD,CAAD,CAAUmL,CAAV,CAAkB,CAhBtC/K,CAAA6K,iBAAA,CAAyB,CAAA,CACzB9O,EAAA,CAAM,CAAA,CAAN,CAAYiE,CAAAJ,QAAA,CAgBGoJ,CAhBH,CAAZ,CAgBqBpJ,CAhBrB,CACI5D,EAAA,CAe0B+O,CAf1B,CAAa,CAAA,CAAb,CAAJ,EACI/K,CAAA+K,OAAA,EAakC,CADxB,CAD+B,CAAjD,CAjB2C,CAA/C,CAv7BS,CAAZ,CAAA,CA++BC3P,CA/+BD,CADkB,CANtB;",
6
+ "sources":["Input_0"],
7
+ "names":["factory","module","exports","Highcharts","H","defaultOptions","doc","Chart","addEvent","removeEvent","fireEvent","createElement","discardElement","css","merge","pick","each","objectEach","extend","win","SVGRenderer","symbols","Renderer","prototype","lang","printChart","downloadPNG","downloadJPEG","downloadPDF","downloadSVG","contextButtonTitle","navigation","buttonOptions","theme","symbolSize","symbolX","symbolY","align","buttonSpacing","height","verticalAlign","width","exporting","type","url","printMaxWidth","scale","buttons","contextButton","className","menuClassName","symbol","_titleKey","menuItems","textKey","onclick","print","separator","exportChart","post","H.post","data","formAttributes","form","method","action","enctype","display","body","val","name","value","submit","sanitizeSVG","svg","options","allowHTML","html","match","chart","replace","getChartHTML","inlineStyles","container","innerHTML","getSVG","chartOptions","chartCopy","sandbox","seriesOptions","sourceHeight","createElementNS","doc.createElementNS","ns","tagName","position","top","chartWidth","chartHeight","cssWidth","renderTo","style","cssHeight","sourceWidth","test","parseInt","animation","forExport","renderer","enabled","series","serie","userOptions","enableMouseTracking","showCheckbox","visible","isInternal","push","axes","axis","internalKey","uniqueKey","callback","coll","collOptions","update","axisCopy","find","copy","extremes","getExtremes","userMin","userMax","undefined","setExtremes","destroy","getSVGForExport","chartExportingOptions","borderRadius","exportingOptions","filename","origDisplay","origParent","parentNode","childNodes","resetParams","handleMaxWidth","isPrinting","pointer","reset","setSize","node","i","nodeType","appendChild","focus","setTimeout","apply","contextMenu","items","x","y","button","cacheName","menu","menuPadding","Math","max","innerMenu","hide","zIndex","padding","setState","openMenu","exportEvents","hideTimer","clearTimeout","e","inClass","target","item","element","stopPropagation","arguments","text","exportDivElements","exportMenuWidth","offsetWidth","exportMenuHeight","offsetHeight","menuStyle","right","left","alignOptions","bottom","addButton","btnOptions","btnCount","exportSVGElements","attr","states","hover","select","call","translateX","translateY","paddingLeft","addClass","title","add","buttonOffset","destroyExport","elem","ontouchstart","length","onmouseout","onmouseover","unbind","inlineToAttributes","inlineBlacklist","unstyledElements","Chart.prototype.inlineStyles","hyphenate","prop","a","b","toLowerCase","recurse","styles","parentStyles","cssText","dummy","indexOf","nodeName","getComputedStyle","defaultStyles","dummySVG","SVG_NS","setAttribute","namespaceURI","removeChild","blacklisted","blacklist","styleAttr","getAttribute","children","querySelector","symbols.menu","arr","renderExporting","Chart.prototype.renderExporting","isDirty","isDirtyExporting","callbacks","redraw"]
8
+ }
@@ -1,780 +1,1025 @@
1
1
  /**
2
- * @license Highstock JS v2.1.10 (2015-12-07)
2
+ * @license Highcharts JS v5.0.11 (2017-05-04)
3
3
  * Exporting module
4
4
  *
5
- * (c) 2010-2014 Torstein Honsi
5
+ * (c) 2010-2017 Torstein Honsi
6
6
  *
7
7
  * License: www.highcharts.com/license
8
8
  */
9
-
10
- /* eslint indent:0 */
11
- (function (factory) {
9
+ 'use strict';
10
+ (function(factory) {
12
11
  if (typeof module === 'object' && module.exports) {
13
12
  module.exports = factory;
14
13
  } else {
15
14
  factory(Highcharts);
16
15
  }
17
- }(function (Highcharts) {
18
-
19
- // create shortcuts
20
- var Chart = Highcharts.Chart,
21
- addEvent = Highcharts.addEvent,
22
- removeEvent = Highcharts.removeEvent,
23
- fireEvent = Highcharts.fireEvent,
24
- createElement = Highcharts.createElement,
25
- discardElement = Highcharts.discardElement,
26
- css = Highcharts.css,
27
- merge = Highcharts.merge,
28
- each = Highcharts.each,
29
- extend = Highcharts.extend,
30
- splat = Highcharts.splat,
31
- math = Math,
32
- mathMax = math.max,
33
- doc = document,
34
- win = window,
35
- isTouchDevice = Highcharts.isTouchDevice,
36
- M = 'M',
37
- L = 'L',
38
- DIV = 'div',
39
- HIDDEN = 'hidden',
40
- NONE = 'none',
41
- PREFIX = 'highcharts-',
42
- ABSOLUTE = 'absolute',
43
- PX = 'px',
44
- UNDEFINED,
45
- symbols = Highcharts.Renderer.prototype.symbols,
46
- defaultOptions = Highcharts.getOptions(),
47
- buttonOffset;
48
-
49
- // Add language
50
- extend(defaultOptions.lang, {
51
- printChart: 'Print chart',
52
- downloadPNG: 'Download PNG image',
53
- downloadJPEG: 'Download JPEG image',
54
- downloadPDF: 'Download PDF document',
55
- downloadSVG: 'Download SVG vector image',
56
- contextButtonTitle: 'Chart context menu'
57
- });
58
-
59
- // Buttons and menus are collected in a separate config option set called 'navigation'.
60
- // This can be extended later to add control buttons like zoom and pan right click menus.
61
- defaultOptions.navigation = {
62
- menuStyle: {
63
- border: '1px solid #A0A0A0',
64
- background: '#FFFFFF',
65
- padding: '5px 0'
66
- },
67
- menuItemStyle: {
68
- padding: '0 10px',
69
- background: NONE,
70
- color: '#303030',
71
- fontSize: isTouchDevice ? '14px' : '11px'
72
- },
73
- menuItemHoverStyle: {
74
- background: '#4572A5',
75
- color: '#FFFFFF'
76
- },
77
-
78
- buttonOptions: {
79
- symbolFill: '#E0E0E0',
80
- symbolSize: 14,
81
- symbolStroke: '#666',
82
- symbolStrokeWidth: 3,
83
- symbolX: 12.5,
84
- symbolY: 10.5,
85
- align: 'right',
86
- buttonSpacing: 3,
87
- height: 22,
88
- // text: null,
89
- theme: {
90
- fill: 'white', // capture hover
91
- stroke: 'none'
92
- },
93
- verticalAlign: 'top',
94
- width: 24
95
- }
96
- };
97
-
98
-
99
-
100
- // Add the export related options
101
- defaultOptions.exporting = {
102
- //enabled: true,
103
- //filename: 'chart',
104
- type: 'image/png',
105
- url: 'http://export.highcharts.com/',
106
- //width: undefined,
107
- //scale: 2
108
- buttons: {
109
- contextButton: {
110
- menuClassName: PREFIX + 'contextmenu',
111
- //x: -10,
112
- symbol: 'menu',
113
- _titleKey: 'contextButtonTitle',
114
- menuItems: [{
115
- textKey: 'printChart',
116
- onclick: function () {
117
- this.print();
118
- }
119
- }, {
120
- separator: true
121
- }, {
122
- textKey: 'downloadPNG',
123
- onclick: function () {
124
- this.exportChart();
125
- }
126
- }, {
127
- textKey: 'downloadJPEG',
128
- onclick: function () {
129
- this.exportChart({
130
- type: 'image/jpeg'
131
- });
132
- }
133
- }, {
134
- textKey: 'downloadPDF',
135
- onclick: function () {
136
- this.exportChart({
137
- type: 'application/pdf'
138
- });
139
- }
140
- }, {
141
- textKey: 'downloadSVG',
142
- onclick: function () {
143
- this.exportChart({
144
- type: 'image/svg+xml'
145
- });
146
- }
147
- }
148
- // Enable this block to add "View SVG" to the dropdown menu
149
- /*
150
- ,{
151
-
152
- text: 'View SVG',
153
- onclick: function () {
154
- var svg = this.getSVG()
155
- .replace(/</g, '\n&lt;')
156
- .replace(/>/g, '&gt;');
157
-
158
- doc.body.innerHTML = '<pre>' + svg + '</pre>';
159
- }
160
- } // */
161
- ]
162
- }
163
- }
164
- };
165
-
166
- // Add the Highcharts.post utility
167
- Highcharts.post = function (url, data, formAttributes) {
168
- var name,
169
- form;
170
-
171
- // create the form
172
- form = createElement('form', merge({
173
- method: 'post',
174
- action: url,
175
- enctype: 'multipart/form-data'
176
- }, formAttributes), {
177
- display: NONE
178
- }, doc.body);
179
-
180
- // add the data
181
- for (name in data) {
182
- createElement('input', {
183
- type: HIDDEN,
184
- name: name,
185
- value: data[name]
186
- }, null, form);
187
- }
188
-
189
- // submit
190
- form.submit();
191
-
192
- // clean up
193
- discardElement(form);
194
- };
195
-
196
- extend(Chart.prototype, {
197
-
198
- /**
199
- * A collection of regex fixes on the produces SVG to account for expando properties,
200
- * browser bugs, VML problems and other. Returns a cleaned SVG.
201
- */
202
- sanitizeSVG: function (svg) {
203
- return svg
204
- .replace(/zIndex="[^"]+"/g, '')
205
- .replace(/isShadow="[^"]+"/g, '')
206
- .replace(/symbolName="[^"]+"/g, '')
207
- .replace(/jQuery[0-9]+="[^"]+"/g, '')
208
- .replace(/url\([^#]+#/g, 'url(#')
209
- .replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
210
- .replace(/ (NS[0-9]+\:)?href=/g, ' xlink:href=') // #3567
211
- .replace(/\n/, ' ')
212
- // Any HTML added to the container after the SVG (#894)
213
- .replace(/<\/svg>.*?$/, '</svg>')
214
- // Batik doesn't support rgba fills and strokes (#3095)
215
- .replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, '$1="rgb($2)" $1-opacity="$3"')
216
- /* This fails in IE < 8
217
- .replace(/([0-9]+)\.([0-9]+)/g, function(s1, s2, s3) { // round off to save weight
218
- return s2 +'.'+ s3[0];
219
- })*/
220
-
221
- // Replace HTML entities, issue #347
222
- .replace(/&nbsp;/g, '\u00A0') // no-break space
223
- .replace(/&shy;/g, '\u00AD') // soft hyphen
224
-
225
- // IE specific
226
- .replace(/<IMG /g, '<image ')
227
- .replace(/<(\/?)TITLE>/g, '<$1title>')
228
- .replace(/height=([^" ]+)/g, 'height="$1"')
229
- .replace(/width=([^" ]+)/g, 'width="$1"')
230
- .replace(/hc-svg-href="([^"]+)">/g, 'xlink:href="$1"/>')
231
- .replace(/ id=([^" >]+)/g, ' id="$1"') // #4003
232
- .replace(/class=([^" >]+)/g, 'class="$1"')
233
- .replace(/ transform /g, ' ')
234
- .replace(/:(path|rect)/g, '$1')
235
- .replace(/style="([^"]+)"/g, function (s) {
236
- return s.toLowerCase();
237
- });
238
- },
239
-
240
- /**
241
- * Return innerHTML of chart. Used as hook for plugins.
242
- */
243
- getChartHTML: function () {
244
- return this.container.innerHTML;
245
- },
246
-
247
- /**
248
- * Return an SVG representation of the chart
249
- *
250
- * @param additionalOptions {Object} Additional chart options for the generated SVG representation
251
- */
252
- getSVG: function (additionalOptions) {
253
- var chart = this,
254
- chartCopy,
255
- sandbox,
256
- svg,
257
- seriesOptions,
258
- sourceWidth,
259
- sourceHeight,
260
- cssWidth,
261
- cssHeight,
262
- html,
263
- options = merge(chart.options, additionalOptions), // copy the options and add extra options
264
- allowHTML = options.exporting.allowHTML;
265
-
266
-
267
- // IE compatibility hack for generating SVG content that it doesn't really understand
268
- if (!doc.createElementNS) {
269
- doc.createElementNS = function (ns, tagName) {
270
- return doc.createElement(tagName);
271
- };
272
- }
273
-
274
- // create a sandbox where a new chart will be generated
275
- sandbox = createElement(DIV, null, {
276
- position: ABSOLUTE,
277
- top: '-9999em',
278
- width: chart.chartWidth + PX,
279
- height: chart.chartHeight + PX
280
- }, doc.body);
281
-
282
- // get the source size
283
- cssWidth = chart.renderTo.style.width;
284
- cssHeight = chart.renderTo.style.height;
285
- sourceWidth = options.exporting.sourceWidth ||
286
- options.chart.width ||
287
- (/px$/.test(cssWidth) && parseInt(cssWidth, 10)) ||
288
- 600;
289
- sourceHeight = options.exporting.sourceHeight ||
290
- options.chart.height ||
291
- (/px$/.test(cssHeight) && parseInt(cssHeight, 10)) ||
292
- 400;
293
-
294
- // override some options
295
- extend(options.chart, {
296
- animation: false,
297
- renderTo: sandbox,
298
- forExport: true,
299
- renderer: 'SVGRenderer',
300
- width: sourceWidth,
301
- height: sourceHeight
302
- });
303
- options.exporting.enabled = false; // hide buttons in print
304
- delete options.data; // #3004
305
-
306
- // prepare for replicating the chart
307
- options.series = [];
308
- each(chart.series, function (serie) {
309
- seriesOptions = merge(serie.options, {
310
- animation: false, // turn off animation
311
- enableMouseTracking: false,
312
- showCheckbox: false,
313
- visible: serie.visible
314
- });
315
-
316
- if (!seriesOptions.isInternal) { // used for the navigator series that has its own option set
317
- options.series.push(seriesOptions);
318
- }
319
- });
320
-
321
- // Axis options must be merged in one by one, since it may be an array or an object (#2022, #3900)
322
- if (additionalOptions) {
323
- each(['xAxis', 'yAxis'], function (axisType) {
324
- each(splat(additionalOptions[axisType]), function (axisOptions, i) {
325
- options[axisType][i] = merge(options[axisType][i], axisOptions);
326
- });
327
- });
328
- }
329
-
330
- // generate the chart copy
331
- chartCopy = new Highcharts.Chart(options, chart.callback);
332
-
333
- // reflect axis extremes in the export
334
- each(['xAxis', 'yAxis'], function (axisType) {
335
- each(chart[axisType], function (axis, i) {
336
- var axisCopy = chartCopy[axisType][i],
337
- extremes = axis.getExtremes(),
338
- userMin = extremes.userMin,
339
- userMax = extremes.userMax;
340
-
341
- if (axisCopy && (userMin !== UNDEFINED || userMax !== UNDEFINED)) {
342
- axisCopy.setExtremes(userMin, userMax, true, false);
343
- }
344
- });
345
- });
346
-
347
- // get the SVG from the container's innerHTML
348
- svg = chartCopy.getChartHTML();
349
-
350
- // free up memory
351
- options = null;
352
- chartCopy.destroy();
353
- discardElement(sandbox);
354
-
355
- // Move HTML into a foreignObject
356
- if (allowHTML) {
357
- html = svg.match(/<\/svg>(.*?$)/);
358
- if (html) {
359
- html = '<foreignObject x="0" y="0" width="200" height="200">' +
360
- '<body xmlns="http://www.w3.org/1999/xhtml">' +
361
- html[1] +
362
- '</body>' +
363
- '</foreignObject>';
364
- svg = svg.replace('</svg>', html + '</svg>');
365
- }
366
- }
367
-
368
- // sanitize
369
- svg = this.sanitizeSVG(svg);
370
-
371
- // IE9 beta bugs with innerHTML. Test again with final IE9.
372
- svg = svg.replace(/(url\(#highcharts-[0-9]+)&quot;/g, '$1')
373
- .replace(/&quot;/g, '\'');
374
-
375
- return svg;
376
- },
377
-
378
- getSVGForExport: function (options, chartOptions) {
379
- var chartExportingOptions = this.options.exporting;
380
-
381
- return this.getSVG(merge(
382
- { chart: { borderRadius: 0 } },
383
- chartExportingOptions.chartOptions,
384
- chartOptions,
385
- {
386
- exporting: {
387
- sourceWidth: (options && options.sourceWidth) || chartExportingOptions.sourceWidth,
388
- sourceHeight: (options && options.sourceHeight) || chartExportingOptions.sourceHeight
389
- }
390
- }
391
- ));
392
- },
393
-
394
- /**
395
- * Submit the SVG representation of the chart to the server
396
- * @param {Object} options Exporting options. Possible members are url, type, width and formAttributes.
397
- * @param {Object} chartOptions Additional chart options for the SVG representation of the chart
398
- */
399
- exportChart: function (options, chartOptions) {
400
-
401
- var svg = this.getSVGForExport(options, chartOptions);
402
-
403
- // merge the options
404
- options = merge(this.options.exporting, options);
405
-
406
- // do the post
407
- Highcharts.post(options.url, {
408
- filename: options.filename || 'chart',
409
- type: options.type,
410
- width: options.width || 0, // IE8 fails to post undefined correctly, so use 0
411
- scale: options.scale || 2,
412
- svg: svg
413
- }, options.formAttributes);
414
-
415
- },
416
-
417
- /**
418
- * Print the chart
419
- */
420
- print: function () {
421
-
422
- var chart = this,
423
- container = chart.container,
424
- origDisplay = [],
425
- origParent = container.parentNode,
426
- body = doc.body,
427
- childNodes = body.childNodes;
428
-
429
- if (chart.isPrinting) { // block the button while in printing mode
430
- return;
431
- }
432
-
433
- chart.isPrinting = true;
434
- chart.pointer.reset(null, 0);
435
-
436
- fireEvent(chart, 'beforePrint');
437
-
438
- // hide all body content
439
- each(childNodes, function (node, i) {
440
- if (node.nodeType === 1) {
441
- origDisplay[i] = node.style.display;
442
- node.style.display = NONE;
443
- }
444
- });
445
-
446
- // pull out the chart
447
- body.appendChild(container);
448
-
449
- // print
450
- win.focus(); // #1510
451
- win.print();
452
-
453
- // allow the browser to prepare before reverting
454
- setTimeout(function () {
455
-
456
- // put the chart back in
457
- origParent.appendChild(container);
458
-
459
- // restore all body content
460
- each(childNodes, function (node, i) {
461
- if (node.nodeType === 1) {
462
- node.style.display = origDisplay[i];
463
- }
464
- });
465
-
466
- chart.isPrinting = false;
467
-
468
- fireEvent(chart, 'afterPrint');
469
-
470
- }, 1000);
471
-
472
- },
473
-
474
- /**
475
- * Display a popup menu for choosing the export type
476
- *
477
- * @param {String} className An identifier for the menu
478
- * @param {Array} items A collection with text and onclicks for the items
479
- * @param {Number} x The x position of the opener button
480
- * @param {Number} y The y position of the opener button
481
- * @param {Number} width The width of the opener button
482
- * @param {Number} height The height of the opener button
483
- */
484
- contextMenu: function (className, items, x, y, width, height, button) {
485
- var chart = this,
486
- navOptions = chart.options.navigation,
487
- menuItemStyle = navOptions.menuItemStyle,
488
- chartWidth = chart.chartWidth,
489
- chartHeight = chart.chartHeight,
490
- cacheName = 'cache-' + className,
491
- menu = chart[cacheName],
492
- menuPadding = mathMax(width, height), // for mouse leave detection
493
- boxShadow = '3px 3px 10px #888',
494
- innerMenu,
495
- hide,
496
- hideTimer,
497
- menuStyle,
498
- docMouseUpHandler = function (e) {
499
- if (!chart.pointer.inClass(e.target, className)) {
500
- hide();
501
- }
502
- };
503
-
504
- // create the menu only the first time
505
- if (!menu) {
506
-
507
- // create a HTML element above the SVG
508
- chart[cacheName] = menu = createElement(DIV, {
509
- className: className
510
- }, {
511
- position: ABSOLUTE,
512
- zIndex: 1000,
513
- padding: menuPadding + PX
514
- }, chart.container);
515
-
516
- innerMenu = createElement(DIV, null,
517
- extend({
518
- MozBoxShadow: boxShadow,
519
- WebkitBoxShadow: boxShadow,
520
- boxShadow: boxShadow
521
- }, navOptions.menuStyle), menu);
522
-
523
- // hide on mouse out
524
- hide = function () {
525
- css(menu, { display: NONE });
526
- if (button) {
527
- button.setState(0);
528
- }
529
- chart.openMenu = false;
530
- };
531
-
532
- // Hide the menu some time after mouse leave (#1357)
533
- addEvent(menu, 'mouseleave', function () {
534
- hideTimer = setTimeout(hide, 500);
535
- });
536
- addEvent(menu, 'mouseenter', function () {
537
- clearTimeout(hideTimer);
538
- });
539
-
540
-
541
- // Hide it on clicking or touching outside the menu (#2258, #2335, #2407)
542
- addEvent(document, 'mouseup', docMouseUpHandler);
543
- addEvent(chart, 'destroy', function () {
544
- removeEvent(document, 'mouseup', docMouseUpHandler);
545
- });
546
-
547
-
548
- // create the items
549
- each(items, function (item) {
550
- if (item) {
551
- var element = item.separator ?
552
- createElement('hr', null, null, innerMenu) :
553
- createElement(DIV, {
554
- onmouseover: function () {
555
- css(this, navOptions.menuItemHoverStyle);
556
- },
557
- onmouseout: function () {
558
- css(this, menuItemStyle);
559
- },
560
- onclick: function (e) {
561
- if (e) { // IE7
562
- e.stopPropagation();
563
- }
564
- hide();
565
- if (item.onclick) {
566
- item.onclick.apply(chart, arguments);
567
- }
568
- },
569
- innerHTML: item.text || chart.options.lang[item.textKey]
570
- }, extend({
571
- cursor: 'pointer'
572
- }, menuItemStyle), innerMenu);
573
-
574
-
575
- // Keep references to menu divs to be able to destroy them
576
- chart.exportDivElements.push(element);
577
- }
578
- });
579
-
580
- // Keep references to menu and innerMenu div to be able to destroy them
581
- chart.exportDivElements.push(innerMenu, menu);
582
-
583
- chart.exportMenuWidth = menu.offsetWidth;
584
- chart.exportMenuHeight = menu.offsetHeight;
585
- }
586
-
587
- menuStyle = { display: 'block' };
588
-
589
- // if outside right, right align it
590
- if (x + chart.exportMenuWidth > chartWidth) {
591
- menuStyle.right = (chartWidth - x - width - menuPadding) + PX;
592
- } else {
593
- menuStyle.left = (x - menuPadding) + PX;
594
- }
595
- // if outside bottom, bottom align it
596
- if (y + height + chart.exportMenuHeight > chartHeight && button.alignOptions.verticalAlign !== 'top') {
597
- menuStyle.bottom = (chartHeight - y - menuPadding) + PX;
598
- } else {
599
- menuStyle.top = (y + height - menuPadding) + PX;
600
- }
601
-
602
- css(menu, menuStyle);
603
- chart.openMenu = true;
604
- },
605
-
606
- /**
607
- * Add the export button to the chart
608
- */
609
- addButton: function (options) {
610
- var chart = this,
611
- renderer = chart.renderer,
612
- btnOptions = merge(chart.options.navigation.buttonOptions, options),
613
- onclick = btnOptions.onclick,
614
- menuItems = btnOptions.menuItems,
615
- symbol,
616
- button,
617
- symbolAttr = {
618
- stroke: btnOptions.symbolStroke,
619
- fill: btnOptions.symbolFill
620
- },
621
- symbolSize = btnOptions.symbolSize || 12;
622
- if (!chart.btnCount) {
623
- chart.btnCount = 0;
624
- }
625
-
626
- // Keeps references to the button elements
627
- if (!chart.exportDivElements) {
628
- chart.exportDivElements = [];
629
- chart.exportSVGElements = [];
630
- }
631
-
632
- if (btnOptions.enabled === false) {
633
- return;
634
- }
635
-
636
-
637
- var attr = btnOptions.theme,
638
- states = attr.states,
639
- hover = states && states.hover,
640
- select = states && states.select,
641
- callback;
642
-
643
- delete attr.states;
644
-
645
- if (onclick) {
646
- callback = function (e) {
647
- e.stopPropagation();
648
- onclick.call(chart, e);
649
- };
650
-
651
- } else if (menuItems) {
652
- callback = function () {
653
- chart.contextMenu(
654
- button.menuClassName,
655
- menuItems,
656
- button.translateX,
657
- button.translateY,
658
- button.width,
659
- button.height,
660
- button
661
- );
662
- button.setState(2);
663
- };
664
- }
665
-
666
-
667
- if (btnOptions.text && btnOptions.symbol) {
668
- attr.paddingLeft = Highcharts.pick(attr.paddingLeft, 25);
669
-
670
- } else if (!btnOptions.text) {
671
- extend(attr, {
672
- width: btnOptions.width,
673
- height: btnOptions.height,
674
- padding: 0
675
- });
676
- }
677
-
678
- button = renderer.button(btnOptions.text, 0, 0, callback, attr, hover, select)
679
- .attr({
680
- title: chart.options.lang[btnOptions._titleKey],
681
- 'stroke-linecap': 'round'
682
- });
683
- button.menuClassName = options.menuClassName || PREFIX + 'menu-' + chart.btnCount++;
684
-
685
- if (btnOptions.symbol) {
686
- symbol = renderer.symbol(
687
- btnOptions.symbol,
688
- btnOptions.symbolX - (symbolSize / 2),
689
- btnOptions.symbolY - (symbolSize / 2),
690
- symbolSize,
691
- symbolSize
692
- )
693
- .attr(extend(symbolAttr, {
694
- 'stroke-width': btnOptions.symbolStrokeWidth || 1,
695
- zIndex: 1
696
- })).add(button);
697
- }
698
-
699
- button.add()
700
- .align(extend(btnOptions, {
701
- width: button.width,
702
- x: Highcharts.pick(btnOptions.x, buttonOffset) // #1654
703
- }), true, 'spacingBox');
704
-
705
- buttonOffset += (button.width + btnOptions.buttonSpacing) * (btnOptions.align === 'right' ? -1 : 1);
706
-
707
- chart.exportSVGElements.push(button, symbol);
708
-
709
- },
710
-
711
- /**
712
- * Destroy the buttons.
713
- */
714
- destroyExport: function (e) {
715
- var chart = e.target,
716
- i,
717
- elem;
718
-
719
- // Destroy the extra buttons added
720
- for (i = 0; i < chart.exportSVGElements.length; i++) {
721
- elem = chart.exportSVGElements[i];
722
-
723
- // Destroy and null the svg/vml elements
724
- if (elem) { // #1822
725
- elem.onclick = elem.ontouchstart = null;
726
- chart.exportSVGElements[i] = elem.destroy();
727
- }
728
- }
729
-
730
- // Destroy the divs for the menu
731
- for (i = 0; i < chart.exportDivElements.length; i++) {
732
- elem = chart.exportDivElements[i];
733
-
734
- // Remove the event handler
735
- removeEvent(elem, 'mouseleave');
736
-
737
- // Remove inline events
738
- chart.exportDivElements[i] = elem.onmouseout = elem.onmouseover = elem.ontouchstart = elem.onclick = null;
739
-
740
- // Destroy the div by moving to garbage bin
741
- discardElement(elem);
742
- }
743
- }
744
- });
745
-
746
-
747
- symbols.menu = function (x, y, width, height) {
748
- var arr = [
749
- M, x, y + 2.5,
750
- L, x + width, y + 2.5,
751
- M, x, y + height / 2 + 0.5,
752
- L, x + width, y + height / 2 + 0.5,
753
- M, x, y + height - 1.5,
754
- L, x + width, y + height - 1.5
755
- ];
756
- return arr;
757
- };
758
-
759
- // Add the buttons on chart load
760
- Chart.prototype.callbacks.push(function (chart) {
761
- var n,
762
- exportingOptions = chart.options.exporting,
763
- buttons = exportingOptions.buttons;
764
-
765
- buttonOffset = 0;
766
-
767
- if (exportingOptions.enabled !== false) {
768
-
769
- for (n in buttons) {
770
- chart.addButton(buttons[n]);
771
- }
772
-
773
- // Destroy the export elements at chart destroy
774
- addEvent(chart, 'destroy', chart.destroyExport);
775
- }
776
-
777
- });
778
-
779
-
16
+ }(function(Highcharts) {
17
+ (function(H) {
18
+ /**
19
+ * Exporting module
20
+ *
21
+ * (c) 2010-2017 Torstein Honsi
22
+ *
23
+ * License: www.highcharts.com/license
24
+ */
25
+
26
+ /* eslint indent:0 */
27
+
28
+ // create shortcuts
29
+ var defaultOptions = H.defaultOptions,
30
+ doc = H.doc,
31
+ Chart = H.Chart,
32
+ addEvent = H.addEvent,
33
+ removeEvent = H.removeEvent,
34
+ fireEvent = H.fireEvent,
35
+ createElement = H.createElement,
36
+ discardElement = H.discardElement,
37
+ css = H.css,
38
+ merge = H.merge,
39
+ pick = H.pick,
40
+ each = H.each,
41
+ objectEach = H.objectEach,
42
+ extend = H.extend,
43
+ isTouchDevice = H.isTouchDevice,
44
+ win = H.win,
45
+ SVGRenderer = H.SVGRenderer;
46
+
47
+ var symbols = H.Renderer.prototype.symbols;
48
+
49
+ // Add language
50
+ extend(defaultOptions.lang, {
51
+ printChart: 'Print chart',
52
+ downloadPNG: 'Download PNG image',
53
+ downloadJPEG: 'Download JPEG image',
54
+ downloadPDF: 'Download PDF document',
55
+ downloadSVG: 'Download SVG vector image',
56
+ contextButtonTitle: 'Chart context menu'
57
+ });
58
+
59
+ // Buttons and menus are collected in a separate config option set called 'navigation'.
60
+ // This can be extended later to add control buttons like zoom and pan right click menus.
61
+ defaultOptions.navigation = {
62
+ buttonOptions: {
63
+ theme: {},
64
+ symbolSize: 14,
65
+ symbolX: 12.5,
66
+ symbolY: 10.5,
67
+ align: 'right',
68
+ buttonSpacing: 3,
69
+ height: 22,
70
+ // text: null,
71
+ verticalAlign: 'top',
72
+ width: 24
73
+ }
74
+ };
75
+
76
+
77
+
78
+
79
+ // Add the export related options
80
+ defaultOptions.exporting = {
81
+ //enabled: true,
82
+ //filename: 'chart',
83
+ type: 'image/png',
84
+ url: 'https://export.highcharts.com/',
85
+ //width: undefined,
86
+ printMaxWidth: 780,
87
+ scale: 2,
88
+ buttons: {
89
+ contextButton: {
90
+ className: 'highcharts-contextbutton',
91
+ menuClassName: 'highcharts-contextmenu',
92
+ //x: -10,
93
+ symbol: 'menu',
94
+ _titleKey: 'contextButtonTitle',
95
+ menuItems: [{
96
+ textKey: 'printChart',
97
+ onclick: function() {
98
+ this.print();
99
+ }
100
+ }, {
101
+ separator: true
102
+ }, {
103
+ textKey: 'downloadPNG',
104
+ onclick: function() {
105
+ this.exportChart();
106
+ }
107
+ }, {
108
+ textKey: 'downloadJPEG',
109
+ onclick: function() {
110
+ this.exportChart({
111
+ type: 'image/jpeg'
112
+ });
113
+ }
114
+ }, {
115
+ textKey: 'downloadPDF',
116
+ onclick: function() {
117
+ this.exportChart({
118
+ type: 'application/pdf'
119
+ });
120
+ }
121
+ }, {
122
+ textKey: 'downloadSVG',
123
+ onclick: function() {
124
+ this.exportChart({
125
+ type: 'image/svg+xml'
126
+ });
127
+ }
128
+ }]
129
+ }
130
+ }
131
+ };
132
+
133
+ // Add the H.post utility
134
+ H.post = function(url, data, formAttributes) {
135
+ // create the form
136
+ var form = createElement('form', merge({
137
+ method: 'post',
138
+ action: url,
139
+ enctype: 'multipart/form-data'
140
+ }, formAttributes), {
141
+ display: 'none'
142
+ }, doc.body);
143
+
144
+ // add the data
145
+ objectEach(data, function(val, name) {
146
+ createElement('input', {
147
+ type: 'hidden',
148
+ name: name,
149
+ value: val
150
+ }, null, form);
151
+ });
152
+
153
+ // submit
154
+ form.submit();
155
+
156
+ // clean up
157
+ discardElement(form);
158
+ };
159
+
160
+ extend(Chart.prototype, /** @lends Highcharts.Chart.prototype */ {
161
+
162
+ /**
163
+ * A collection of fixes on the produced SVG to account for expando properties,
164
+ * browser bugs, VML problems and other. Returns a cleaned SVG.
165
+ */
166
+ sanitizeSVG: function(svg, options) {
167
+ // Move HTML into a foreignObject
168
+ if (options && options.exporting && options.exporting.allowHTML) {
169
+ var html = svg.match(/<\/svg>(.*?$)/);
170
+ if (html && html[1]) {
171
+ html = '<foreignObject x="0" y="0" ' +
172
+ 'width="' + options.chart.width + '" ' +
173
+ 'height="' + options.chart.height + '">' +
174
+ '<body xmlns="http://www.w3.org/1999/xhtml">' +
175
+ html[1] +
176
+ '</body>' +
177
+ '</foreignObject>';
178
+ svg = svg.replace('</svg>', html + '</svg>');
179
+ }
180
+ }
181
+
182
+ svg = svg
183
+ .replace(/zIndex="[^"]+"/g, '')
184
+ .replace(/isShadow="[^"]+"/g, '')
185
+ .replace(/symbolName="[^"]+"/g, '')
186
+ .replace(/jQuery[0-9]+="[^"]+"/g, '')
187
+ .replace(/url\(("|&quot;)(\S+)("|&quot;)\)/g, 'url($2)')
188
+ .replace(/url\([^#]+#/g, 'url(#')
189
+ .replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
190
+ .replace(/ (NS[0-9]+\:)?href=/g, ' xlink:href=') // #3567
191
+ .replace(/\n/, ' ')
192
+ // Any HTML added to the container after the SVG (#894)
193
+ .replace(/<\/svg>.*?$/, '</svg>')
194
+ // Batik doesn't support rgba fills and strokes (#3095)
195
+ .replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, '$1="rgb($2)" $1-opacity="$3"')
196
+ /* This fails in IE < 8
197
+ .replace(/([0-9]+)\.([0-9]+)/g, function(s1, s2, s3) { // round off to save weight
198
+ return s2 +'.'+ s3[0];
199
+ })*/
200
+
201
+ // Replace HTML entities, issue #347
202
+ .replace(/&nbsp;/g, '\u00A0') // no-break space
203
+ .replace(/&shy;/g, '\u00AD'); // soft hyphen
204
+
205
+
206
+
207
+ return svg;
208
+ },
209
+
210
+ /**
211
+ * Return innerHTML of chart. Used as hook for plugins.
212
+ */
213
+ getChartHTML: function() {
214
+
215
+ this.inlineStyles();
216
+
217
+ return this.container.innerHTML;
218
+ },
219
+
220
+ /**
221
+ * Return an SVG representation of the chart.
222
+ *
223
+ * @param chartOptions {Options}
224
+ * Additional chart options for the generated SVG representation.
225
+ * For collections like `xAxis`, `yAxis` or `series`, the additional
226
+ * options is either merged in to the orininal item of the same
227
+ * `id`, or to the first item if a common id is not found.
228
+ * @return {String}
229
+ * The SVG representation of the rendered chart.
230
+ * @sample highcharts/members/chart-getsvg/
231
+ * View the SVG from a button
232
+ */
233
+ getSVG: function(chartOptions) {
234
+ var chart = this,
235
+ chartCopy,
236
+ sandbox,
237
+ svg,
238
+ seriesOptions,
239
+ sourceWidth,
240
+ sourceHeight,
241
+ cssWidth,
242
+ cssHeight,
243
+ options = merge(chart.options, chartOptions); // copy the options and add extra options
244
+
245
+
246
+ // IE compatibility hack for generating SVG content that it doesn't really understand
247
+ if (!doc.createElementNS) {
248
+ doc.createElementNS = function(ns, tagName) {
249
+ return doc.createElement(tagName);
250
+ };
251
+ }
252
+
253
+ // create a sandbox where a new chart will be generated
254
+ sandbox = createElement('div', null, {
255
+ position: 'absolute',
256
+ top: '-9999em',
257
+ width: chart.chartWidth + 'px',
258
+ height: chart.chartHeight + 'px'
259
+ }, doc.body);
260
+
261
+ // get the source size
262
+ cssWidth = chart.renderTo.style.width;
263
+ cssHeight = chart.renderTo.style.height;
264
+ sourceWidth = options.exporting.sourceWidth ||
265
+ options.chart.width ||
266
+ (/px$/.test(cssWidth) && parseInt(cssWidth, 10)) ||
267
+ 600;
268
+ sourceHeight = options.exporting.sourceHeight ||
269
+ options.chart.height ||
270
+ (/px$/.test(cssHeight) && parseInt(cssHeight, 10)) ||
271
+ 400;
272
+
273
+ // override some options
274
+ extend(options.chart, {
275
+ animation: false,
276
+ renderTo: sandbox,
277
+ forExport: true,
278
+ renderer: 'SVGRenderer',
279
+ width: sourceWidth,
280
+ height: sourceHeight
281
+ });
282
+ options.exporting.enabled = false; // hide buttons in print
283
+ delete options.data; // #3004
284
+
285
+ // prepare for replicating the chart
286
+ options.series = [];
287
+ each(chart.series, function(serie) {
288
+ seriesOptions = merge(serie.userOptions, { // #4912
289
+ animation: false, // turn off animation
290
+ enableMouseTracking: false,
291
+ showCheckbox: false,
292
+ visible: serie.visible
293
+ });
294
+
295
+ if (!seriesOptions.isInternal) { // used for the navigator series that has its own option set
296
+ options.series.push(seriesOptions);
297
+ }
298
+ });
299
+
300
+ // Assign an internal key to ensure a one-to-one mapping (#5924)
301
+ each(chart.axes, function(axis) {
302
+ if (!axis.userOptions.internalKey) { // #6444
303
+ axis.userOptions.internalKey = H.uniqueKey();
304
+ }
305
+ });
306
+
307
+ // generate the chart copy
308
+ chartCopy = new H.Chart(options, chart.callback);
309
+
310
+ // Axis options and series options (#2022, #3900, #5982)
311
+ if (chartOptions) {
312
+ each(['xAxis', 'yAxis', 'series'], function(coll) {
313
+ var collOptions = {};
314
+ if (chartOptions[coll]) {
315
+ collOptions[coll] = chartOptions[coll];
316
+ chartCopy.update(collOptions);
317
+ }
318
+ });
319
+ }
320
+
321
+ // Reflect axis extremes in the export (#5924)
322
+ each(chart.axes, function(axis) {
323
+ var axisCopy = H.find(chartCopy.axes, function(copy) {
324
+ return copy.options.internalKey ===
325
+ axis.userOptions.internalKey;
326
+ }),
327
+ extremes = axis.getExtremes(),
328
+ userMin = extremes.userMin,
329
+ userMax = extremes.userMax;
330
+
331
+ if (axisCopy && (userMin !== undefined || userMax !== undefined)) {
332
+ axisCopy.setExtremes(userMin, userMax, true, false);
333
+ }
334
+ });
335
+
336
+ // Get the SVG from the container's innerHTML
337
+ svg = chartCopy.getChartHTML();
338
+
339
+ svg = chart.sanitizeSVG(svg, options);
340
+
341
+ // free up memory
342
+ options = null;
343
+ chartCopy.destroy();
344
+ discardElement(sandbox);
345
+
346
+ return svg;
347
+ },
348
+
349
+ getSVGForExport: function(options, chartOptions) {
350
+ var chartExportingOptions = this.options.exporting;
351
+
352
+ return this.getSVG(merge({
353
+ chart: {
354
+ borderRadius: 0
355
+ }
356
+ },
357
+ chartExportingOptions.chartOptions,
358
+ chartOptions, {
359
+ exporting: {
360
+ sourceWidth: (options && options.sourceWidth) || chartExportingOptions.sourceWidth,
361
+ sourceHeight: (options && options.sourceHeight) || chartExportingOptions.sourceHeight
362
+ }
363
+ }
364
+ ));
365
+ },
366
+
367
+ /**
368
+ * Exporting module required. Submit an SVG version of the chart to a server
369
+ * along with some parameters for conversion.
370
+ * @param {Object} exportingOptions
371
+ * Exporting options in addition to those defined in {@link
372
+ * https://api.highcharts.com/highcharts/exporting|exporting}.
373
+ * @param {String} exportingOptions.filename
374
+ * The file name for the export without extension.
375
+ * @param {String} exportingOptions.url
376
+ * The URL for the server module to do the conversion.
377
+ * @param {Number} exportingOptions.width
378
+ * The width of the PNG or JPG image generated on the server.
379
+ * @param {String} exportingOptions.type
380
+ * The MIME type of the converted image.
381
+ * @param {Number} exportingOptions.sourceWidth
382
+ * The pixel width of the source (in-page) chart.
383
+ * @param {Number} exportingOptions.sourceHeight
384
+ * The pixel height of the source (in-page) chart.
385
+ * @param {Options} chartOptions
386
+ * Additional chart options for the exported chart. For example a
387
+ * different background color can be added here, or `dataLabels`
388
+ * for export only.
389
+ *
390
+ * @sample highcharts/members/chart-exportchart/
391
+ * Export with no options
392
+ * @sample highcharts/members/chart-exportchart-filename/
393
+ * PDF type and custom filename
394
+ * @sample highcharts/members/chart-exportchart-custom-background/
395
+ * Different chart background in export
396
+ */
397
+ exportChart: function(exportingOptions, chartOptions) {
398
+
399
+ var svg = this.getSVGForExport(exportingOptions, chartOptions);
400
+
401
+ // merge the options
402
+ exportingOptions = merge(this.options.exporting, exportingOptions);
403
+
404
+ // do the post
405
+ H.post(exportingOptions.url, {
406
+ filename: exportingOptions.filename || 'chart',
407
+ type: exportingOptions.type,
408
+ width: exportingOptions.width || 0, // IE8 fails to post undefined correctly, so use 0
409
+ scale: exportingOptions.scale,
410
+ svg: svg
411
+ }, exportingOptions.formAttributes);
412
+
413
+ },
414
+
415
+ /**
416
+ * Exporting module required. Clears away other elements in the page and
417
+ * prints the chart as it is displayed. By default, when the exporting
418
+ * module is enabled, a context button with a drop down menu in the upper
419
+ * right corner accesses this function.
420
+ *
421
+ * @sample highcharts/members/chart-print/
422
+ * Print from a HTML button
423
+ */
424
+ print: function() {
425
+
426
+ var chart = this,
427
+ container = chart.container,
428
+ origDisplay = [],
429
+ origParent = container.parentNode,
430
+ body = doc.body,
431
+ childNodes = body.childNodes,
432
+ printMaxWidth = chart.options.exporting.printMaxWidth,
433
+ resetParams,
434
+ handleMaxWidth;
435
+
436
+ if (chart.isPrinting) { // block the button while in printing mode
437
+ return;
438
+ }
439
+
440
+ chart.isPrinting = true;
441
+ chart.pointer.reset(null, 0);
442
+
443
+ fireEvent(chart, 'beforePrint');
444
+
445
+ // Handle printMaxWidth
446
+ handleMaxWidth = printMaxWidth && chart.chartWidth > printMaxWidth;
447
+ if (handleMaxWidth) {
448
+ resetParams = [chart.options.chart.width, undefined, false];
449
+ chart.setSize(printMaxWidth, undefined, false);
450
+ }
451
+
452
+ // hide all body content
453
+ each(childNodes, function(node, i) {
454
+ if (node.nodeType === 1) {
455
+ origDisplay[i] = node.style.display;
456
+ node.style.display = 'none';
457
+ }
458
+ });
459
+
460
+ // pull out the chart
461
+ body.appendChild(container);
462
+
463
+ // print
464
+ win.focus(); // #1510
465
+ win.print();
466
+
467
+ // allow the browser to prepare before reverting
468
+ setTimeout(function() {
469
+
470
+ // put the chart back in
471
+ origParent.appendChild(container);
472
+
473
+ // restore all body content
474
+ each(childNodes, function(node, i) {
475
+ if (node.nodeType === 1) {
476
+ node.style.display = origDisplay[i];
477
+ }
478
+ });
479
+
480
+ chart.isPrinting = false;
481
+
482
+ // Reset printMaxWidth
483
+ if (handleMaxWidth) {
484
+ chart.setSize.apply(chart, resetParams);
485
+ }
486
+
487
+ fireEvent(chart, 'afterPrint');
488
+
489
+ }, 1000);
490
+
491
+ },
492
+
493
+ /**
494
+ * Display a popup menu for choosing the export type
495
+ *
496
+ * @param {String} className An identifier for the menu
497
+ * @param {Array} items A collection with text and onclicks for the items
498
+ * @param {Number} x The x position of the opener button
499
+ * @param {Number} y The y position of the opener button
500
+ * @param {Number} width The width of the opener button
501
+ * @param {Number} height The height of the opener button
502
+ */
503
+ contextMenu: function(className, items, x, y, width, height, button) {
504
+ var chart = this,
505
+ navOptions = chart.options.navigation,
506
+ chartWidth = chart.chartWidth,
507
+ chartHeight = chart.chartHeight,
508
+ cacheName = 'cache-' + className,
509
+ menu = chart[cacheName],
510
+ menuPadding = Math.max(width, height), // for mouse leave detection
511
+ innerMenu,
512
+ hide,
513
+ menuStyle;
514
+
515
+ // create the menu only the first time
516
+ if (!menu) {
517
+
518
+ // create a HTML element above the SVG
519
+ chart[cacheName] = menu = createElement('div', {
520
+ className: className
521
+ }, {
522
+ position: 'absolute',
523
+ zIndex: 1000,
524
+ padding: menuPadding + 'px'
525
+ }, chart.container);
526
+
527
+ innerMenu = createElement('div', {
528
+ className: 'highcharts-menu'
529
+ }, null, menu);
530
+
531
+
532
+
533
+ // hide on mouse out
534
+ hide = function() {
535
+ css(menu, {
536
+ display: 'none'
537
+ });
538
+ if (button) {
539
+ button.setState(0);
540
+ }
541
+ chart.openMenu = false;
542
+ };
543
+
544
+ // Hide the menu some time after mouse leave (#1357)
545
+ chart.exportEvents.push(
546
+ addEvent(menu, 'mouseleave', function() {
547
+ menu.hideTimer = setTimeout(hide, 500);
548
+ }),
549
+ addEvent(menu, 'mouseenter', function() {
550
+ clearTimeout(menu.hideTimer);
551
+ }),
552
+
553
+ // Hide it on clicking or touching outside the menu (#2258, #2335,
554
+ // #2407)
555
+ addEvent(doc, 'mouseup', function(e) {
556
+ if (!chart.pointer.inClass(e.target, className)) {
557
+ hide();
558
+ }
559
+ })
560
+ );
561
+
562
+ // create the items
563
+ each(items, function(item) {
564
+ if (item) {
565
+ var element;
566
+
567
+ if (item.separator) {
568
+ element = createElement('hr', null, null, innerMenu);
569
+
570
+ } else {
571
+ element = createElement('div', {
572
+ className: 'highcharts-menu-item',
573
+ onclick: function(e) {
574
+ if (e) { // IE7
575
+ e.stopPropagation();
576
+ }
577
+ hide();
578
+ if (item.onclick) {
579
+ item.onclick.apply(chart, arguments);
580
+ }
581
+ },
582
+ innerHTML: item.text || chart.options.lang[item.textKey]
583
+ }, null, innerMenu);
584
+
585
+
586
+ }
587
+
588
+ // Keep references to menu divs to be able to destroy them
589
+ chart.exportDivElements.push(element);
590
+ }
591
+ });
592
+
593
+ // Keep references to menu and innerMenu div to be able to destroy them
594
+ chart.exportDivElements.push(innerMenu, menu);
595
+
596
+ chart.exportMenuWidth = menu.offsetWidth;
597
+ chart.exportMenuHeight = menu.offsetHeight;
598
+ }
599
+
600
+ menuStyle = {
601
+ display: 'block'
602
+ };
603
+
604
+ // if outside right, right align it
605
+ if (x + chart.exportMenuWidth > chartWidth) {
606
+ menuStyle.right = (chartWidth - x - width - menuPadding) + 'px';
607
+ } else {
608
+ menuStyle.left = (x - menuPadding) + 'px';
609
+ }
610
+ // if outside bottom, bottom align it
611
+ if (y + height + chart.exportMenuHeight > chartHeight && button.alignOptions.verticalAlign !== 'top') {
612
+ menuStyle.bottom = (chartHeight - y - menuPadding) + 'px';
613
+ } else {
614
+ menuStyle.top = (y + height - menuPadding) + 'px';
615
+ }
616
+
617
+ css(menu, menuStyle);
618
+ chart.openMenu = true;
619
+ },
620
+
621
+ /**
622
+ * Add the export button to the chart
623
+ */
624
+ addButton: function(options) {
625
+ var chart = this,
626
+ renderer = chart.renderer,
627
+ btnOptions = merge(chart.options.navigation.buttonOptions, options),
628
+ onclick = btnOptions.onclick,
629
+ menuItems = btnOptions.menuItems,
630
+ symbol,
631
+ button,
632
+ symbolSize = btnOptions.symbolSize || 12;
633
+ if (!chart.btnCount) {
634
+ chart.btnCount = 0;
635
+ }
636
+
637
+ // Keeps references to the button elements
638
+ if (!chart.exportDivElements) {
639
+ chart.exportDivElements = [];
640
+ chart.exportSVGElements = [];
641
+ }
642
+
643
+ if (btnOptions.enabled === false) {
644
+ return;
645
+ }
646
+
647
+
648
+ var attr = btnOptions.theme,
649
+ states = attr.states,
650
+ hover = states && states.hover,
651
+ select = states && states.select,
652
+ callback;
653
+
654
+ delete attr.states;
655
+
656
+ if (onclick) {
657
+ callback = function(e) {
658
+ e.stopPropagation();
659
+ onclick.call(chart, e);
660
+ };
661
+
662
+ } else if (menuItems) {
663
+ callback = function() {
664
+ chart.contextMenu(
665
+ button.menuClassName,
666
+ menuItems,
667
+ button.translateX,
668
+ button.translateY,
669
+ button.width,
670
+ button.height,
671
+ button
672
+ );
673
+ button.setState(2);
674
+ };
675
+ }
676
+
677
+
678
+ if (btnOptions.text && btnOptions.symbol) {
679
+ attr.paddingLeft = pick(attr.paddingLeft, 25);
680
+
681
+ } else if (!btnOptions.text) {
682
+ extend(attr, {
683
+ width: btnOptions.width,
684
+ height: btnOptions.height,
685
+ padding: 0
686
+ });
687
+ }
688
+
689
+ button = renderer.button(btnOptions.text, 0, 0, callback, attr, hover, select)
690
+ .addClass(options.className)
691
+ .attr({
692
+
693
+ title: chart.options.lang[btnOptions._titleKey],
694
+ zIndex: 3 // #4955
695
+ });
696
+ button.menuClassName = options.menuClassName || 'highcharts-menu-' + chart.btnCount++;
697
+
698
+ if (btnOptions.symbol) {
699
+ symbol = renderer.symbol(
700
+ btnOptions.symbol,
701
+ btnOptions.symbolX - (symbolSize / 2),
702
+ btnOptions.symbolY - (symbolSize / 2),
703
+ symbolSize,
704
+ symbolSize
705
+ )
706
+ .addClass('highcharts-button-symbol')
707
+ .attr({
708
+ zIndex: 1
709
+ }).add(button);
710
+
711
+
712
+ }
713
+
714
+ button.add()
715
+ .align(extend(btnOptions, {
716
+ width: button.width,
717
+ x: pick(btnOptions.x, chart.buttonOffset) // #1654
718
+ }), true, 'spacingBox');
719
+
720
+ chart.buttonOffset += (button.width + btnOptions.buttonSpacing) * (btnOptions.align === 'right' ? -1 : 1);
721
+
722
+ chart.exportSVGElements.push(button, symbol);
723
+
724
+ },
725
+
726
+ /**
727
+ * Destroy the buttons.
728
+ */
729
+ destroyExport: function(e) {
730
+ var chart = e ? e.target : this,
731
+ exportSVGElements = chart.exportSVGElements,
732
+ exportDivElements = chart.exportDivElements,
733
+ exportEvents = chart.exportEvents,
734
+ cacheName;
735
+
736
+ // Destroy the extra buttons added
737
+ if (exportSVGElements) {
738
+ each(exportSVGElements, function(elem, i) {
739
+
740
+ // Destroy and null the svg/vml elements
741
+ if (elem) { // #1822
742
+ elem.onclick = elem.ontouchstart = null;
743
+ cacheName = 'cache-' + elem.menuClassName;
744
+
745
+ if (chart[cacheName]) {
746
+ delete chart[cacheName];
747
+ }
748
+
749
+ chart.exportSVGElements[i] = elem.destroy();
750
+ }
751
+ });
752
+ exportSVGElements.length = 0;
753
+ }
754
+
755
+ // Destroy the divs for the menu
756
+ if (exportDivElements) {
757
+ each(exportDivElements, function(elem, i) {
758
+
759
+ // Remove the event handler
760
+ clearTimeout(elem.hideTimer); // #5427
761
+ removeEvent(elem, 'mouseleave');
762
+
763
+ // Remove inline events
764
+ chart.exportDivElements[i] = elem.onmouseout = elem.onmouseover = elem.ontouchstart = elem.onclick = null;
765
+
766
+ // Destroy the div by moving to garbage bin
767
+ discardElement(elem);
768
+ });
769
+ exportDivElements.length = 0;
770
+ }
771
+
772
+ if (exportEvents) {
773
+ each(exportEvents, function(unbind) {
774
+ unbind();
775
+ });
776
+ exportEvents.length = 0;
777
+ }
778
+ }
779
+ });
780
+
781
+
782
+ // These ones are translated to attributes rather than styles
783
+ SVGRenderer.prototype.inlineToAttributes = [
784
+ 'fill',
785
+ 'stroke',
786
+ 'strokeLinecap',
787
+ 'strokeLinejoin',
788
+ 'strokeWidth',
789
+ 'textAnchor',
790
+ 'x',
791
+ 'y'
792
+ ];
793
+ // These CSS properties are not inlined. Remember camelCase.
794
+ SVGRenderer.prototype.inlineBlacklist = [
795
+ /-/, // In Firefox, both hyphened and camelCased names are listed
796
+ /^(clipPath|cssText|d|height|width)$/, // Full words
797
+ /^font$/, // more specific props are set
798
+ /[lL]ogical(Width|Height)$/,
799
+ /perspective/,
800
+ /TapHighlightColor/,
801
+ /^transition/
802
+ // /^text (border|color|cursor|height|webkitBorder)/
803
+ ];
804
+ SVGRenderer.prototype.unstyledElements = [
805
+ 'clipPath',
806
+ 'defs',
807
+ 'desc'
808
+ ];
809
+
810
+ /**
811
+ * Analyze inherited styles from stylesheets and add them inline
812
+ *
813
+ * @todo: What are the border styles for text about? In general, text has a lot of properties.
814
+ * @todo: Make it work with IE9 and IE10.
815
+ */
816
+ Chart.prototype.inlineStyles = function() {
817
+ var renderer = this.renderer,
818
+ inlineToAttributes = renderer.inlineToAttributes,
819
+ blacklist = renderer.inlineBlacklist,
820
+ unstyledElements = renderer.unstyledElements,
821
+ defaultStyles = {},
822
+ dummySVG;
823
+
824
+ /**
825
+ * Make hyphenated property names out of camelCase
826
+ */
827
+ function hyphenate(prop) {
828
+ return prop.replace(
829
+ /([A-Z])/g,
830
+ function(a, b) {
831
+ return '-' + b.toLowerCase();
832
+ }
833
+ );
834
+ }
835
+
836
+ /**
837
+ * Call this on all elements and recurse to children
838
+ */
839
+ function recurse(node) {
840
+ var styles,
841
+ parentStyles,
842
+ cssText = '',
843
+ dummy,
844
+ styleAttr,
845
+ blacklisted,
846
+ i,
847
+ prop;
848
+
849
+ if (node.nodeType === 1 && unstyledElements.indexOf(node.nodeName) === -1) {
850
+ styles = win.getComputedStyle(node, null);
851
+ parentStyles = node.nodeName === 'svg' ? {} : win.getComputedStyle(node.parentNode, null);
852
+
853
+ // Get default styles from the browser so that we don't have to add these
854
+ if (!defaultStyles[node.nodeName]) {
855
+ if (!dummySVG) {
856
+ dummySVG = doc.createElementNS(H.SVG_NS, 'svg');
857
+ dummySVG.setAttribute('version', '1.1');
858
+ doc.body.appendChild(dummySVG);
859
+ }
860
+ dummy = doc.createElementNS(node.namespaceURI, node.nodeName);
861
+ dummySVG.appendChild(dummy);
862
+ defaultStyles[node.nodeName] = merge(win.getComputedStyle(dummy, null)); // Copy, so we can remove the node
863
+ dummySVG.removeChild(dummy);
864
+ }
865
+
866
+ // Loop over all the computed styles and check whether they are in
867
+ // the white list for styles or atttributes. Use a plain for-in loop
868
+ // because the styles object also contains numerically indexed
869
+ // pointers to its keys, and objectEach will fail in Firefox.
870
+ for (prop in styles) {
871
+ // Check against blacklist
872
+ blacklisted = false;
873
+ i = blacklist.length;
874
+ while (i-- && !blacklisted) {
875
+ blacklisted = blacklist[i].test(prop) ||
876
+ typeof styles[prop] === 'function';
877
+ }
878
+
879
+ if (!blacklisted) {
880
+
881
+ // If parent node has the same style, it gets inherited, no
882
+ // need to inline it
883
+ if (
884
+ parentStyles[prop] !== styles[prop] &&
885
+ defaultStyles[node.nodeName][prop] !== styles[prop]
886
+ ) {
887
+
888
+ // Attributes
889
+ if (inlineToAttributes.indexOf(prop) !== -1) {
890
+ node.setAttribute(hyphenate(prop), styles[prop]);
891
+
892
+ // Styles
893
+ } else {
894
+ cssText += hyphenate(prop) + ':' +
895
+ styles[prop] + ';';
896
+ }
897
+ }
898
+ }
899
+ }
900
+
901
+ // Apply styles
902
+ if (cssText) {
903
+ styleAttr = node.getAttribute('style');
904
+ node.setAttribute('style', (styleAttr ? styleAttr + ';' : '') + cssText);
905
+ }
906
+
907
+ if (node.nodeName === 'text') {
908
+ return;
909
+ }
910
+
911
+ // Recurse
912
+ each(node.children || node.childNodes, recurse);
913
+ }
914
+ }
915
+
916
+ /**
917
+ * Remove the dummy objects used to get defaults
918
+ */
919
+ function tearDown() {
920
+ dummySVG.parentNode.removeChild(dummySVG);
921
+ }
922
+
923
+ recurse(this.container.querySelector('svg'));
924
+ tearDown();
925
+
926
+ };
927
+
928
+
929
+
930
+ symbols.menu = function(x, y, width, height) {
931
+ var arr = [
932
+ 'M', x, y + 2.5,
933
+ 'L', x + width, y + 2.5,
934
+ 'M', x, y + height / 2 + 0.5,
935
+ 'L', x + width, y + height / 2 + 0.5,
936
+ 'M', x, y + height - 1.5,
937
+ 'L', x + width, y + height - 1.5
938
+ ];
939
+ return arr;
940
+ };
941
+
942
+ // Add the buttons on chart load
943
+ Chart.prototype.renderExporting = function() {
944
+ var chart = this,
945
+ exportingOptions = chart.options.exporting,
946
+ buttons = exportingOptions.buttons,
947
+ isDirty = chart.isDirtyExporting || !chart.exportSVGElements;
948
+
949
+ chart.buttonOffset = 0;
950
+ if (chart.isDirtyExporting) {
951
+ chart.destroyExport();
952
+ }
953
+
954
+ if (isDirty && exportingOptions.enabled !== false) {
955
+ chart.exportEvents = [];
956
+
957
+ objectEach(buttons, function(button) {
958
+ chart.addButton(button);
959
+ });
960
+
961
+ chart.isDirtyExporting = false;
962
+ }
963
+
964
+ // Destroy the export elements at chart destroy
965
+ addEvent(chart, 'destroy', chart.destroyExport);
966
+ };
967
+
968
+ Chart.prototype.callbacks.push(function(chart) {
969
+
970
+ function update(prop, options, redraw) {
971
+ chart.isDirtyExporting = true;
972
+ merge(true, chart.options[prop], options);
973
+ if (pick(redraw, true)) {
974
+ chart.redraw();
975
+ }
976
+
977
+ }
978
+
979
+ chart.renderExporting();
980
+
981
+ addEvent(chart, 'redraw', chart.renderExporting);
982
+
983
+ // Add update methods to handle chart.update and chart.exporting.update
984
+ // and chart.navigation.update.
985
+ each(['exporting', 'navigation'], function(prop) {
986
+ chart[prop] = {
987
+ update: function(options, redraw) {
988
+ update(prop, options, redraw);
989
+ }
990
+ };
991
+ });
992
+
993
+ // Uncomment this to see a button directly below the chart, for quick
994
+ // testing of export
995
+ /*
996
+ if (!chart.renderer.forExport) {
997
+ var button;
998
+
999
+ // View SVG Image
1000
+ button = doc.createElement('button');
1001
+ button.innerHTML = 'View SVG Image';
1002
+ chart.renderTo.parentNode.appendChild(button);
1003
+ button.onclick = function () {
1004
+ var div = doc.createElement('div');
1005
+ div.innerHTML = chart.getSVGForExport();
1006
+ chart.renderTo.parentNode.appendChild(div);
1007
+ };
1008
+
1009
+ // View SVG Source
1010
+ button = doc.createElement('button');
1011
+ button.innerHTML = 'View SVG Source';
1012
+ chart.renderTo.parentNode.appendChild(button);
1013
+ button.onclick = function () {
1014
+ var pre = doc.createElement('pre');
1015
+ pre.innerHTML = chart.getSVGForExport()
1016
+ .replace(/</g, '\n&lt;')
1017
+ .replace(/>/g, '&gt;');
1018
+ chart.renderTo.parentNode.appendChild(pre);
1019
+ };
1020
+ }
1021
+ // */
1022
+ });
1023
+
1024
+ }(Highcharts));
780
1025
  }));