corrade-nucleus-nucleons – Blame information for rev 31

Subversion Repositories:
Rev:
Rev Author Line No. Line
31 office 1 /**
2 * @license Highcharts JS v5.0.14 (2017-07-28)
3 * Exporting module
4 *
5 * (c) 2010-2017 Torstein Honsi
6 *
7 * License: www.highcharts.com/license
8 */
9 'use strict';
10 (function(factory) {
11 if (typeof module === 'object' && module.exports) {
12 module.exports = factory;
13 } else {
14 factory(Highcharts);
15 }
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 userAgent = win.navigator.userAgent,
46 SVGRenderer = H.SVGRenderer,
47 symbols = H.Renderer.prototype.symbols,
48 isMSBrowser = /Edge\/|Trident\/|MSIE /.test(userAgent),
49 isFirefoxBrowser = /firefox/i.test(userAgent);
50  
51 // Add language
52 /**
53 * @apioption lang
54 */
55 extend(defaultOptions.lang, {
56 printChart: 'Print chart',
57 downloadPNG: 'Download PNG image',
58 downloadJPEG: 'Download JPEG image',
59 downloadPDF: 'Download PDF document',
60 downloadSVG: 'Download SVG vector image',
61 contextButtonTitle: 'Chart context menu'
62 });
63  
64 // Buttons and menus are collected in a separate config option set called 'navigation'.
65 // This can be extended later to add control buttons like zoom and pan right click menus.
66  
67 /**
68 * @apioption navigation
69 */
70 defaultOptions.navigation = {
71 buttonOptions: {
72 theme: {},
73 symbolSize: 14,
74 symbolX: 12.5,
75 symbolY: 10.5,
76 align: 'right',
77 buttonSpacing: 3,
78 height: 22,
79 // text: null,
80 verticalAlign: 'top',
81 width: 24
82 }
83 };
84  
85  
86 // Presentational attributes
87  
88 merge(true, defaultOptions.navigation,
89 /**
90 * A collection of options for buttons and menus appearing in the exporting module.
91 * @type {Object}
92 * @optionparent navigation
93 */
94 {
95  
96 /**
97 * CSS styles for the popup menu appearing by default when the export
98 * icon is clicked. This menu is rendered in HTML.
99 *
100 * @type {CSSObject}
101 * @see In [styled mode](http://www.highcharts.com/docs/chart-design-and-
102 * style/style-by-css), the menu is styled with the `.highcharts-menu`
103 * class.
104 * @sample {highcharts} highcharts/navigation/menustyle/ Light gray menu background
105 * @sample {highstock} highcharts/navigation/menustyle/ Light gray menu background
106 * @sample {highmaps} highcharts/navigation/menustyle/ Light gray menu background
107 * @default { "border": "1px solid #999999", "background": "#ffffff", "padding": "5px 0" }
108 * @since 2.0
109 * @product highcharts highstock highmaps
110 */
111 menuStyle: {
112  
113 /**
114 */
115 border: '1px solid #999999',
116  
117 /**
118 */
119 background: '#ffffff',
120  
121 /**
122 */
123 padding: '5px 0'
124 },
125  
126 /**
127 * CSS styles for the individual items within the popup menu appearing
128 * by default when the export icon is clicked. The menu items are rendered
129 * in HTML.
130 *
131 * @type {CSSObject}
132 * @see In [styled mode](http://www.highcharts.com/docs/chart-design-and-
133 * style/style-by-css), the menu items are styled with the `.highcharts-
134 * menu-item` class.
135 * @sample {highcharts} highcharts/navigation/menuitemstyle/ Add a grey stripe to the left
136 * @sample {highstock} highcharts/navigation/menuitemstyle/ Add a grey stripe to the left
137 * @sample {highmaps} highcharts/navigation/menuitemstyle/ Add a grey stripe to the left
138 * @default { "padding": "0.5em 1em", "color": "#333333", "background": "none" }
139 * @since 2.0
140 * @product highcharts highstock highmaps
141 */
142 menuItemStyle: {
143  
144 /**
145 */
146 padding: '0.5em 1em',
147  
148 /**
149 */
150 background: 'none',
151  
152 /**
153 */
154 color: '#333333',
155  
156 /**
157 */
158 fontSize: isTouchDevice ? '14px' : '11px',
159  
160 /**
161 */
162 transition: 'background 250ms, color 250ms'
163 },
164  
165 /**
166 * CSS styles for the hover state of the individual items within the
167 * popup menu appearing by default when the export icon is clicked.
168 * The menu items are rendered in HTML.
169 *
170 * @type {CSSObject}
171 * @see In [styled mode](http://www.highcharts.com/docs/chart-design-and-
172 * style/style-by-css), the menu items are styled with the `.highcharts-
173 * menu-item` class.
174 * @sample {highcharts} highcharts/navigation/menuitemhoverstyle/ Bold text on hover
175 * @sample {highstock} highcharts/navigation/menuitemhoverstyle/ Bold text on hover
176 * @sample {highmaps} highcharts/navigation/menuitemhoverstyle/ Bold text on hover
177 * @default { "background": "#335cad", "color": "#ffffff" }
178 * @since 2.0
179 * @product highcharts highstock highmaps
180 */
181 menuItemHoverStyle: {
182  
183 /**
184 */
185 background: '#335cad',
186  
187 /**
188 */
189 color: '#ffffff'
190 },
191  
192 /**
193 * A collection of options for buttons appearing in the exporting module.
194 *
195 *
196 * In [styled mode](http://www.highcharts.com/docs/chart-design-and-
197 * style/style-by-css), the buttons are styled with the `.highcharts-
198 * contextbutton` and `.highcharts-button-symbol` class.
199 *
200 * @product highcharts highstock highmaps
201 */
202 buttonOptions: {
203  
204 /**
205 * Fill color for the symbol within the button.
206 *
207 * @type {Color}
208 * @sample {highcharts} highcharts/navigation/buttonoptions-symbolfill/ Blue symbol stroke for one of the buttons
209 * @sample {highstock} highcharts/navigation/buttonoptions-symbolfill/ Blue symbol stroke for one of the buttons
210 * @sample {highmaps} highcharts/navigation/buttonoptions-symbolfill/ Blue symbol stroke for one of the buttons
211 * @default #666666
212 * @since 2.0
213 * @product highcharts highstock highmaps
214 */
215 symbolFill: '#666666',
216  
217 /**
218 * The color of the symbol's stroke or line.
219 *
220 * @type {Color}
221 * @sample {highcharts} highcharts/navigation/buttonoptions-symbolstroke/ Blue symbol stroke
222 * @sample {highstock} highcharts/navigation/buttonoptions-symbolstroke/ Blue symbol stroke
223 * @sample {highmaps} highcharts/navigation/buttonoptions-symbolstroke/ Blue symbol stroke
224 * @default #666666
225 * @since 2.0
226 * @product highcharts highstock highmaps
227 */
228 symbolStroke: '#666666',
229  
230 /**
231 * The pixel stroke width of the symbol on the button.
232 *
233 * @type {Number}
234 * @sample {highcharts} highcharts/navigation/buttonoptions-height/ Bigger buttons
235 * @sample {highstock} highcharts/navigation/buttonoptions-height/ Bigger buttons
236 * @sample {highmaps} highcharts/navigation/buttonoptions-height/ Bigger buttons
237 * @default 1
238 * @since 2.0
239 * @product highcharts highstock highmaps
240 */
241 symbolStrokeWidth: 3,
242  
243 /**
244 * A configuration object for the button theme. The object accepts
245 * SVG properties like `stroke-width`, `stroke` and `fill`. Tri-state
246 * button styles are supported by the `states.hover` and `states.select`
247 * objects.
248 *
249 * @type {Object}
250 * @sample {highcharts} highcharts/navigation/buttonoptions-theme/ Theming the buttons
251 * @sample {highstock} highcharts/navigation/buttonoptions-theme/ Theming the buttons
252 * @sample {highmaps} highcharts/navigation/buttonoptions-theme/ Theming the buttons
253 * @since 3.0
254 * @product highcharts highstock highmaps
255 */
256 theme: {
257  
258 /**
259 */
260 fill: '#ffffff', // capture hover
261  
262 /**
263 */
264 stroke: 'none',
265  
266 /**
267 */
268 padding: 5
269 }
270 }
271 });
272  
273  
274  
275 // Add the export related options
276  
277 /**
278 * Options for the exporting module. For an overview on the matter, see [the docs](http://www.highcharts.com/docs/export-module/export-module-overview).
279 * @type {Object}
280 * @optionparent exporting
281 */
282 defaultOptions.exporting = {
283 //enabled: true,
284 //filename: 'chart',
285  
286 /**
287 * Default MIME type for exporting if `chart.exportChart()` is called
288 * without specifying a `type` option. Possible values are `image/png`,
289 * `image/jpeg`, `application/pdf` and `image/svg+xml`.
290 *
291 * @validvalue ["image/png", "image/jpeg", "application/pdf", "image/svg+xml"]
292 * @type {String}
293 * @default image/png
294 * @since 2.0
295 * @product highcharts highstock highmaps
296 */
297 type: 'image/png',
298  
299 /**
300 * The URL for the server module converting the SVG string to an image
301 * format. By default this points to Highchart's free web service.
302 *
303 * @type {String}
304 * @default https://export.highcharts.com
305 * @since 2.0
306 * @product highcharts highstock highmaps
307 */
308 url: 'https://export.highcharts.com/',
309 //width: undefined,
310  
311 /**
312 * When printing the chart from the menu item in the burger menu, if
313 * the on-screen chart exceeds this width, it is resized. After printing
314 * or cancelled, it is restored. The default width makes the chart
315 * fit into typical paper format. Note that this does not affect the
316 * chart when printing the web page as a whole.
317 *
318 * @type {Number}
319 * @default 780
320 * @since 4.2.5
321 * @product highcharts highstock highmaps
322 */
323 printMaxWidth: 780,
324  
325 /**
326 * Defines the scale or zoom factor for the exported image compared
327 * to the on-screen display. While for instance a 600px wide chart
328 * may look good on a website, it will look bad in print. The default
329 * scale of 2 makes this chart export to a 1200px PNG or JPG.
330 *
331 * @type {Number}
332 * @see [chart.width](#chart.width), [exporting.sourceWidth](#exporting.
333 * sourceWidth)
334 * @sample {highcharts} highcharts/exporting/scale/ Scale demonstrated
335 * @sample {highstock} highcharts/exporting/scale/ Scale demonstrated
336 * @sample {highmaps} maps/exporting/scale/ Scale demonstrated
337 * @default 2
338 * @since 3.0
339 * @product highcharts highstock highmaps
340 */
341 scale: 2,
342  
343 /**
344 * Options for the export related buttons, print and export. In addition
345 * to the default buttons listed here, custom buttons can be added.
346 * See [navigation.buttonOptions](#navigation.buttonOptions) for general
347 * options.
348 *
349 * @product highcharts highstock highmaps
350 */
351 buttons: {
352  
353 /**
354 * Options for the export button.
355 *
356 * In [styled mode](http://www.highcharts.com/docs/chart-design-and-
357 * style/style-by-css), export button styles can be applied with the
358 * `.highcharts-contextbutton` class.
359 *
360 * @extends navigation.buttonOptions
361 * @product highcharts highstock highmaps
362 */
363 contextButton: {
364  
365 /**
366 */
367 className: 'highcharts-contextbutton',
368  
369 /**
370 */
371 menuClassName: 'highcharts-contextmenu',
372 //x: -10,
373  
374 /**
375 * The symbol for the button. Points to a definition function in
376 * the `Highcharts.Renderer.symbols` collection. The default `exportIcon`
377 * function is part of the exporting module.
378 *
379 * @validvalue ["circle", "square", "diamond", "triangle", "triangle-down", "menu"]
380 * @type {String}
381 * @sample {highcharts} highcharts/exporting/buttons-contextbutton-symbol/ Use a circle for symbol
382 * @sample {highstock} highcharts/exporting/buttons-contextbutton-symbol/ Use a circle for symbol
383 * @sample {highmaps} highcharts/exporting/buttons-contextbutton-symbol/ Use a circle for symbol
384 * @default menu
385 * @since 2.0
386 * @product highcharts highstock highmaps
387 */
388 symbol: 'menu',
389  
390 /**
391 */
392 _titleKey: 'contextButtonTitle',
393  
394 /**
395 * A collection of config options for the menu items. Each options
396 * object consists of a `text` option which is a string to show in
397 * the menu item, as well as an `onclick` parameter which is a callback
398 * function to run on click.
399 *
400 * By default, there is the "Print" menu item plus one menu item
401 * for each of the available export types. Menu items can be customized
402 * by defining a new array of items and assigning `null` to unwanted
403 * positions (see override example below).
404 *
405 * @type {Array<Object>}
406 * @sample {highcharts} highcharts/exporting/buttons-contextbutton-onclick/ Skip the menu and export the chart directly
407 * @sample {highcharts} highcharts/exporting/buttons-contextbutton-menuitems/ Override the menu items
408 * @sample {highstock} highcharts/exporting/buttons-contextbutton-onclick/ Skip the menu and export the chart directly
409 * @sample {highstock} highcharts/exporting/buttons-contextbutton-menuitems/ Override the menu items
410 * @sample {highmaps} highcharts/exporting/buttons-contextbutton-onclick/ Skip the menu and export the chart directly
411 * @sample {highmaps} highcharts/exporting/buttons-contextbutton-menuitems/ Override the menu items
412 * @since 2.0
413 * @product highcharts highstock highmaps
414 */
415 menuItems: [
416 'printChart',
417 'separator',
418 'downloadPNG',
419 'downloadJPEG',
420 'downloadPDF',
421 'downloadSVG'
422 ]
423 }
424 },
425 // docs. Created API item with since:next. Add information and link to sample
426 // from menuItems too.
427  
428 /**
429 * An object consisting of definitions for the menu items in the context
430 * menu. Each key value pair has a `key` that is referenced in the
431 * [menuItems](#exporting.buttons.contextButton.menuItems) setting,
432 * and a `value`, which is an object with the following properties:
433 *
434 * <dl>
435 *
436 * <dt>onclick</dt>
437 *
438 * <dd>The click handler for the menu item</dd>
439 *
440 * <dt>text</dt>
441 *
442 * <dd>The text for the menu item</dd>
443 *
444 * <dt>textKey</dt>
445 *
446 * <dd>If internationalization is required, the key to a language string</dd>
447 *
448 * </dl>
449 *
450 * @type {Object}
451 * @sample {highcharts} highcharts/exporting/menuitemdefinitions/ Menu item definitions
452 * @sample {highstock} highcharts/exporting/menuitemdefinitions/ Menu item definitions
453 * @sample {highmaps} highcharts/exporting/menuitemdefinitions/ Menu item definitions
454 * @since next
455 * @product highcharts highstock highmaps
456 */
457 menuItemDefinitions: {
458  
459 /**
460 */
461 printChart: {
462  
463 /**
464 */
465 textKey: 'printChart',
466  
467 /**
468 */
469 onclick: function() {
470 this.print();
471 }
472 },
473  
474 /**
475 */
476 separator: {
477  
478 /**
479 */
480 separator: true
481 },
482  
483 /**
484 */
485 downloadPNG: {
486  
487 /**
488 */
489 textKey: 'downloadPNG',
490  
491 /**
492 */
493 onclick: function() {
494 this.exportChart();
495 }
496 },
497  
498 /**
499 */
500 downloadJPEG: {
501  
502 /**
503 */
504 textKey: 'downloadJPEG',
505  
506 /**
507 */
508 onclick: function() {
509 this.exportChart({
510 type: 'image/jpeg'
511 });
512 }
513 },
514  
515 /**
516 */
517 downloadPDF: {
518  
519 /**
520 */
521 textKey: 'downloadPDF',
522  
523 /**
524 */
525 onclick: function() {
526 this.exportChart({
527 type: 'application/pdf'
528 });
529 }
530 },
531  
532 /**
533 */
534 downloadSVG: {
535  
536 /**
537 */
538 textKey: 'downloadSVG',
539  
540 /**
541 */
542 onclick: function() {
543 this.exportChart({
544 type: 'image/svg+xml'
545 });
546 }
547 }
548 }
549 };
550  
551 /**
552 * Fires after a chart is printed through the context menu item or the
553 * `Chart.print` method. Requires the exporting module.
554 *
555 * @type {Function}
556 * @context Chart
557 * @sample {highcharts} highcharts/chart/events-beforeprint-afterprint/
558 * Rescale the chart to print
559 * @sample {highstock} highcharts/chart/events-beforeprint-afterprint/
560 * Rescale the chart to print
561 * @sample {highmaps} highcharts/chart/events-beforeprint-afterprint/
562 * Rescale the chart to print
563 * @since 4.1.0
564 * @apioption chart.events.afterPrint
565 */
566  
567 /**
568 * Fires before a chart is printed through the context menu item or
569 * the `Chart.print` method. Requires the exporting module.
570 *
571 * @type {Function}
572 * @context Chart
573 * @sample {highcharts} highcharts/chart/events-beforeprint-afterprint/
574 * Rescale the chart to print
575 * @sample {highstock} highcharts/chart/events-beforeprint-afterprint/
576 * Rescale the chart to print
577 * @sample {highmaps} highcharts/chart/events-beforeprint-afterprint/
578 * Rescale the chart to print
579 * @since 4.1.0
580 * @apioption chart.events.beforePrint
581 */
582  
583  
584 // Add the H.post utility
585 H.post = function(url, data, formAttributes) {
586 // create the form
587 var form = createElement('form', merge({
588 method: 'post',
589 action: url,
590 enctype: 'multipart/form-data'
591 }, formAttributes), {
592 display: 'none'
593 }, doc.body);
594  
595 // add the data
596 objectEach(data, function(val, name) {
597 createElement('input', {
598 type: 'hidden',
599 name: name,
600 value: val
601 }, null, form);
602 });
603  
604 // submit
605 form.submit();
606  
607 // clean up
608 discardElement(form);
609 };
610  
611 extend(Chart.prototype, /** @lends Highcharts.Chart.prototype */ {
612  
613 /**
614 * Exporting module only. A collection of fixes on the produced SVG to
615 * account for expando properties, browser bugs, VML problems and other.
616 * Returns a cleaned SVG.
617 *
618 * @private
619 */
620 sanitizeSVG: function(svg, options) {
621 // Move HTML into a foreignObject
622 if (options && options.exporting && options.exporting.allowHTML) {
623 var html = svg.match(/<\/svg>(.*?$)/);
624 <\/svg> if (html && html[1]) {
625 <\/svg> html = '<foreignObject x="0" y="0" ' +
626 <\/svg> 'width="' + options.chart.width + '" ' +
627 <\/svg> 'height="' + options.chart.height + '">' +
628 <\/svg> '<body xmlns="http://www.w3.org/1999/xhtml">' +
629 <\/svg> html[1] +
630 <\/svg> '</body>' +
631 <\/svg> '</foreignObject>';
632 <\/svg> svg = svg.replace('</svg>', html + '</svg>');
633 <\/svg> }
634 <\/svg> }
635  
636 <\/svg> svg = svg
637 <\/svg> .replace(/zIndex="[^"]+"/g, '')
638 <\/svg> .replace(/isShadow="[^"]+"/g, '')
639 <\/svg> .replace(/symbolName="[^"]+"/g, '')
640 <\/svg> .replace(/jQuery[0-9]+="[^"]+"/g, '')
641 <\/svg> .replace(/url\(("|")(\S+)("|")\)/g, 'url($2)')
642 <\/svg> .replace(/url\([^#]+#/g, 'url(#')
643 <\/svg> .replace(/, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
644 <\/svg> .replace(/ (NS[0-9]+\:)?href=/g, ' xlink:href=') // #3567
645 <\/svg> .replace(/\n/, ' ')
646 <\/svg> // Any HTML added to the container after the SVG (#894)
647 <\/svg> .replace(/<\/svg>.*?$/, '</svg>')
648 <\/svg><\/svg> // Batik doesn't support rgba fills and strokes (#3095)
649 <\/svg><\/svg> .replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, '$1="rgb($2)" $1-opacity="$3"')
650 <\/svg><\/svg> /* This fails in IE < 8
651 <\/svg><\/svg> .replace(/([0-9]+)\.([0-9]+)/g, function(s1, s2, s3) { // round off to save weight
652 <\/svg><\/svg> return s2 +'.'+ s3[0];
653 <\/svg><\/svg> })*/
654  
655 <\/svg><\/svg> // Replace HTML entities, issue #347
656 <\/svg><\/svg> .replace(/ /g, '\u00A0') // no-break space
657 <\/svg><\/svg> .replace(/­/g, '\u00AD'); // soft hyphen
658  
659  
660 <\/svg><\/svg> // IE specific
661 <\/svg><\/svg> svg = svg
662 <\/svg><\/svg> .replace(/g, '<image ')
663 <\/svg><\/svg> .replace(/<(\/?)TITLE>/g, '<$1title>')
664 <\/svg><\/svg><(\/?)TITLE> .replace(/height=([^" ]+)/g, 'height="$1"')
665 <\/svg><\/svg><(\/?)TITLE> .replace(/width=([^" ]+)/g, 'width="$1"')
666 <\/svg><\/svg><(\/?)TITLE> .replace(/hc-svg-href="([^"]+)">/g, 'xlink:href="$1"/>')
667 <\/svg><\/svg><(\/?)TITLE> .replace(/ id=([^" >]+)/g, ' id="$1"') // #4003
668 <\/svg><\/svg><(\/?)TITLE> .replace(/class=([^" >]+)/g, 'class="$1"')
669 <\/svg><\/svg><(\/?)TITLE> .replace(/ transform /g, ' ')
670 <\/svg><\/svg><(\/?)TITLE> .replace(/:(path|rect)/g, '$1')
671 <\/svg><\/svg><(\/?)TITLE> .replace(/style="([^"]+)"/g, function(s) {
672 <\/svg><\/svg><(\/?)TITLE> return s.toLowerCase();
673 <\/svg><\/svg><(\/?)TITLE> });
674  
675  
676 <\/svg><\/svg><(\/?)TITLE> return svg;
677 <\/svg><\/svg><(\/?)TITLE> },
678  
679 <\/svg><\/svg><(\/?)TITLE> /**
680 <\/svg><\/svg><(\/?)TITLE> * Return the unfiltered innerHTML of the chart container. Used as hook for
681 <\/svg><\/svg><(\/?)TITLE> * plugins. In styled mode, it also takes care of inlining CSS style rules.
682 <\/svg><\/svg><(\/?)TITLE> *
683 <\/svg><\/svg><(\/?)TITLE> * @see Chart#getSVG
684 <\/svg><\/svg><(\/?)TITLE> *
685 <\/svg><\/svg><(\/?)TITLE> * @returns {String}
686 <\/svg><\/svg><(\/?)TITLE> * The unfiltered SVG of the chart.
687 <\/svg><\/svg><(\/?)TITLE> */
688 <\/svg><\/svg><(\/?)TITLE> getChartHTML: function() {
689  
690 <\/svg><\/svg><(\/?)TITLE> return this.container.innerHTML;
691 <\/svg><\/svg><(\/?)TITLE> },
692  
693 <\/svg><\/svg><(\/?)TITLE> /**
694 <\/svg><\/svg><(\/?)TITLE> * Return an SVG representation of the chart.
695 <\/svg><\/svg><(\/?)TITLE> *
696 <\/svg><\/svg><(\/?)TITLE> * @param chartOptions {Options}
697 <\/svg><\/svg><(\/?)TITLE> * Additional chart options for the generated SVG representation.
698 <\/svg><\/svg><(\/?)TITLE> * For collections like `xAxis`, `yAxis` or `series`, the additional
699 <\/svg><\/svg><(\/?)TITLE> * options is either merged in to the orininal item of the same
700 <\/svg><\/svg><(\/?)TITLE> * `id`, or to the first item if a common id is not found.
701 <\/svg><\/svg><(\/?)TITLE> * @return {String}
702 <\/svg><\/svg><(\/?)TITLE> * The SVG representation of the rendered chart.
703 <\/svg><\/svg><(\/?)TITLE> * @sample highcharts/members/chart-getsvg/
704 <\/svg><\/svg><(\/?)TITLE> * View the SVG from a button
705 <\/svg><\/svg><(\/?)TITLE> */
706 <\/svg><\/svg><(\/?)TITLE> getSVG: function(chartOptions) {
707 <\/svg><\/svg><(\/?)TITLE> var chart = this,
708 <\/svg><\/svg><(\/?)TITLE> chartCopy,
709 <\/svg><\/svg><(\/?)TITLE> sandbox,
710 <\/svg><\/svg><(\/?)TITLE> svg,
711 <\/svg><\/svg><(\/?)TITLE> seriesOptions,
712 <\/svg><\/svg><(\/?)TITLE> sourceWidth,
713 <\/svg><\/svg><(\/?)TITLE> sourceHeight,
714 <\/svg><\/svg><(\/?)TITLE> cssWidth,
715 <\/svg><\/svg><(\/?)TITLE> cssHeight,
716 <\/svg><\/svg><(\/?)TITLE> options = merge(chart.options, chartOptions); // copy the options and add extra options
717  
718  
719 <\/svg><\/svg><(\/?)TITLE> // IE compatibility hack for generating SVG content that it doesn't really understand
720 <\/svg><\/svg><(\/?)TITLE> if (!doc.createElementNS) {
721 <\/svg><\/svg><(\/?)TITLE> doc.createElementNS = function(ns, tagName) {
722 <\/svg><\/svg><(\/?)TITLE> return doc.createElement(tagName);
723 <\/svg><\/svg><(\/?)TITLE> };
724 <\/svg><\/svg><(\/?)TITLE> }
725  
726 <\/svg><\/svg><(\/?)TITLE> // create a sandbox where a new chart will be generated
727 <\/svg><\/svg><(\/?)TITLE> sandbox = createElement('div', null, {
728 <\/svg><\/svg><(\/?)TITLE> position: 'absolute',
729 <\/svg><\/svg><(\/?)TITLE> top: '-9999em',
730 <\/svg><\/svg><(\/?)TITLE> width: chart.chartWidth + 'px',
731 <\/svg><\/svg><(\/?)TITLE> height: chart.chartHeight + 'px'
732 <\/svg><\/svg><(\/?)TITLE> }, doc.body);
733  
734 <\/svg><\/svg><(\/?)TITLE> // get the source size
735 <\/svg><\/svg><(\/?)TITLE> cssWidth = chart.renderTo.style.width;
736 <\/svg><\/svg><(\/?)TITLE> cssHeight = chart.renderTo.style.height;
737 <\/svg><\/svg><(\/?)TITLE> sourceWidth = options.exporting.sourceWidth ||
738 <\/svg><\/svg><(\/?)TITLE> options.chart.width ||
739 <\/svg><\/svg><(\/?)TITLE> (/px$/.test(cssWidth) && parseInt(cssWidth, 10)) ||
740 <\/svg><\/svg><(\/?)TITLE> 600;
741 <\/svg><\/svg><(\/?)TITLE> sourceHeight = options.exporting.sourceHeight ||
742 <\/svg><\/svg><(\/?)TITLE> options.chart.height ||
743 <\/svg><\/svg><(\/?)TITLE> (/px$/.test(cssHeight) && parseInt(cssHeight, 10)) ||
744 <\/svg><\/svg><(\/?)TITLE> 400;
745  
746 <\/svg><\/svg><(\/?)TITLE> // override some options
747 <\/svg><\/svg><(\/?)TITLE> extend(options.chart, {
748 <\/svg><\/svg><(\/?)TITLE> animation: false,
749 <\/svg><\/svg><(\/?)TITLE> renderTo: sandbox,
750 <\/svg><\/svg><(\/?)TITLE> forExport: true,
751 <\/svg><\/svg><(\/?)TITLE> renderer: 'SVGRenderer',
752 <\/svg><\/svg><(\/?)TITLE> width: sourceWidth,
753 <\/svg><\/svg><(\/?)TITLE> height: sourceHeight
754 <\/svg><\/svg><(\/?)TITLE> });
755 <\/svg><\/svg><(\/?)TITLE> options.exporting.enabled = false; // hide buttons in print
756 <\/svg><\/svg><(\/?)TITLE> delete options.data; // #3004
757  
758 <\/svg><\/svg><(\/?)TITLE> // prepare for replicating the chart
759 <\/svg><\/svg><(\/?)TITLE> options.series = [];
760 <\/svg><\/svg><(\/?)TITLE> each(chart.series, function(serie) {
761 <\/svg><\/svg><(\/?)TITLE> seriesOptions = merge(serie.userOptions, { // #4912
762 <\/svg><\/svg><(\/?)TITLE> animation: false, // turn off animation
763 <\/svg><\/svg><(\/?)TITLE> enableMouseTracking: false,
764 <\/svg><\/svg><(\/?)TITLE> showCheckbox: false,
765 <\/svg><\/svg><(\/?)TITLE> visible: serie.visible
766 <\/svg><\/svg><(\/?)TITLE> });
767  
768 <\/svg><\/svg><(\/?)TITLE> if (!seriesOptions.isInternal) { // used for the navigator series that has its own option set
769 <\/svg><\/svg><(\/?)TITLE> options.series.push(seriesOptions);
770 <\/svg><\/svg><(\/?)TITLE> }
771 <\/svg><\/svg><(\/?)TITLE> });
772  
773 <\/svg><\/svg><(\/?)TITLE> // Assign an internal key to ensure a one-to-one mapping (#5924)
774 <\/svg><\/svg><(\/?)TITLE> each(chart.axes, function(axis) {
775 <\/svg><\/svg><(\/?)TITLE> if (!axis.userOptions.internalKey) { // #6444
776 <\/svg><\/svg><(\/?)TITLE> axis.userOptions.internalKey = H.uniqueKey();
777 <\/svg><\/svg><(\/?)TITLE> }
778 <\/svg><\/svg><(\/?)TITLE> });
779  
780 <\/svg><\/svg><(\/?)TITLE> // generate the chart copy
781 <\/svg><\/svg><(\/?)TITLE> chartCopy = new H.Chart(options, chart.callback);
782  
783 <\/svg><\/svg><(\/?)TITLE> // Axis options and series options (#2022, #3900, #5982)
784 <\/svg><\/svg><(\/?)TITLE> if (chartOptions) {
785 <\/svg><\/svg><(\/?)TITLE> each(['xAxis', 'yAxis', 'series'], function(coll) {
786 <\/svg><\/svg><(\/?)TITLE> var collOptions = {};
787 <\/svg><\/svg><(\/?)TITLE> if (chartOptions[coll]) {
788 <\/svg><\/svg><(\/?)TITLE> collOptions[coll] = chartOptions[coll];
789 <\/svg><\/svg><(\/?)TITLE> chartCopy.update(collOptions);
790 <\/svg><\/svg><(\/?)TITLE> }
791 <\/svg><\/svg><(\/?)TITLE> });
792 <\/svg><\/svg><(\/?)TITLE> }
793  
794 <\/svg><\/svg><(\/?)TITLE> // Reflect axis extremes in the export (#5924)
795 <\/svg><\/svg><(\/?)TITLE> each(chart.axes, function(axis) {
796 <\/svg><\/svg><(\/?)TITLE> var axisCopy = H.find(chartCopy.axes, function(copy) {
797 <\/svg><\/svg><(\/?)TITLE> return copy.options.internalKey ===
798 <\/svg><\/svg><(\/?)TITLE> axis.userOptions.internalKey;
799 <\/svg><\/svg><(\/?)TITLE> }),
800 <\/svg><\/svg><(\/?)TITLE> extremes = axis.getExtremes(),
801 <\/svg><\/svg><(\/?)TITLE> userMin = extremes.userMin,
802 <\/svg><\/svg><(\/?)TITLE> userMax = extremes.userMax;
803  
804 <\/svg><\/svg><(\/?)TITLE> if (axisCopy && (userMin !== undefined || userMax !== undefined)) {
805 <\/svg><\/svg><(\/?)TITLE> axisCopy.setExtremes(userMin, userMax, true, false);
806 <\/svg><\/svg><(\/?)TITLE> }
807 <\/svg><\/svg><(\/?)TITLE> });
808  
809 <\/svg><\/svg><(\/?)TITLE> // Get the SVG from the container's innerHTML
810 <\/svg><\/svg><(\/?)TITLE> svg = chartCopy.getChartHTML();
811  
812 <\/svg><\/svg><(\/?)TITLE> svg = chart.sanitizeSVG(svg, options);
813  
814 <\/svg><\/svg><(\/?)TITLE> // free up memory
815 <\/svg><\/svg><(\/?)TITLE> options = null;
816 <\/svg><\/svg><(\/?)TITLE> chartCopy.destroy();
817 <\/svg><\/svg><(\/?)TITLE> discardElement(sandbox);
818  
819 <\/svg><\/svg><(\/?)TITLE> return svg;
820 <\/svg><\/svg><(\/?)TITLE> },
821  
822 <\/svg><\/svg><(\/?)TITLE> getSVGForExport: function(options, chartOptions) {
823 <\/svg><\/svg><(\/?)TITLE> var chartExportingOptions = this.options.exporting;
824  
825 <\/svg><\/svg><(\/?)TITLE> return this.getSVG(merge({
826 <\/svg><\/svg><(\/?)TITLE> chart: {
827 <\/svg><\/svg><(\/?)TITLE> borderRadius: 0
828 <\/svg><\/svg><(\/?)TITLE> }
829 <\/svg><\/svg><(\/?)TITLE> },
830 <\/svg><\/svg><(\/?)TITLE> chartExportingOptions.chartOptions,
831 <\/svg><\/svg><(\/?)TITLE> chartOptions, {
832 <\/svg><\/svg><(\/?)TITLE> exporting: {
833 <\/svg><\/svg><(\/?)TITLE> sourceWidth: (options && options.sourceWidth) || chartExportingOptions.sourceWidth,
834 <\/svg><\/svg><(\/?)TITLE> sourceHeight: (options && options.sourceHeight) || chartExportingOptions.sourceHeight
835 <\/svg><\/svg><(\/?)TITLE> }
836 <\/svg><\/svg><(\/?)TITLE> }
837 <\/svg><\/svg><(\/?)TITLE> ));
838 <\/svg><\/svg><(\/?)TITLE> },
839  
840 <\/svg><\/svg><(\/?)TITLE> /**
841 <\/svg><\/svg><(\/?)TITLE> * Exporting module required. Submit an SVG version of the chart to a server
842 <\/svg><\/svg><(\/?)TITLE> * along with some parameters for conversion.
843 <\/svg><\/svg><(\/?)TITLE> * @param {Object} exportingOptions
844 <\/svg><\/svg><(\/?)TITLE> * Exporting options in addition to those defined in {@link
845 <\/svg><\/svg><(\/?)TITLE> * https://api.highcharts.com/highcharts/exporting|exporting}.
846 <\/svg><\/svg><(\/?)TITLE> * @param {String} exportingOptions.filename
847 <\/svg><\/svg><(\/?)TITLE> * The file name for the export without extension.
848 <\/svg><\/svg><(\/?)TITLE> * @param {String} exportingOptions.url
849 <\/svg><\/svg><(\/?)TITLE> * The URL for the server module to do the conversion.
850 <\/svg><\/svg><(\/?)TITLE> * @param {Number} exportingOptions.width
851 <\/svg><\/svg><(\/?)TITLE> * The width of the PNG or JPG image generated on the server.
852 <\/svg><\/svg><(\/?)TITLE> * @param {String} exportingOptions.type
853 <\/svg><\/svg><(\/?)TITLE> * The MIME type of the converted image.
854 <\/svg><\/svg><(\/?)TITLE> * @param {Number} exportingOptions.sourceWidth
855 <\/svg><\/svg><(\/?)TITLE> * The pixel width of the source (in-page) chart.
856 <\/svg><\/svg><(\/?)TITLE> * @param {Number} exportingOptions.sourceHeight
857 <\/svg><\/svg><(\/?)TITLE> * The pixel height of the source (in-page) chart.
858 <\/svg><\/svg><(\/?)TITLE> * @param {Options} chartOptions
859 <\/svg><\/svg><(\/?)TITLE> * Additional chart options for the exported chart. For example a
860 <\/svg><\/svg><(\/?)TITLE> * different background color can be added here, or `dataLabels`
861 <\/svg><\/svg><(\/?)TITLE> * for export only.
862 <\/svg><\/svg><(\/?)TITLE> *
863 <\/svg><\/svg><(\/?)TITLE> * @sample highcharts/members/chart-exportchart/
864 <\/svg><\/svg><(\/?)TITLE> * Export with no options
865 <\/svg><\/svg><(\/?)TITLE> * @sample highcharts/members/chart-exportchart-filename/
866 <\/svg><\/svg><(\/?)TITLE> * PDF type and custom filename
867 <\/svg><\/svg><(\/?)TITLE> * @sample highcharts/members/chart-exportchart-custom-background/
868 <\/svg><\/svg><(\/?)TITLE> * Different chart background in export
869 <\/svg><\/svg><(\/?)TITLE> * @sample stock/members/chart-exportchart/
870 <\/svg><\/svg><(\/?)TITLE> * Export with Highstock
871 <\/svg><\/svg><(\/?)TITLE> */
872 <\/svg><\/svg><(\/?)TITLE> exportChart: function(exportingOptions, chartOptions) {
873  
874 <\/svg><\/svg><(\/?)TITLE> var svg = this.getSVGForExport(exportingOptions, chartOptions);
875  
876 <\/svg><\/svg><(\/?)TITLE> // merge the options
877 <\/svg><\/svg><(\/?)TITLE> exportingOptions = merge(this.options.exporting, exportingOptions);
878  
879 <\/svg><\/svg><(\/?)TITLE> // do the post
880 <\/svg><\/svg><(\/?)TITLE> H.post(exportingOptions.url, {
881 <\/svg><\/svg><(\/?)TITLE> filename: exportingOptions.filename || 'chart',
882 <\/svg><\/svg><(\/?)TITLE> type: exportingOptions.type,
883 <\/svg><\/svg><(\/?)TITLE> width: exportingOptions.width || 0, // IE8 fails to post undefined correctly, so use 0
884 <\/svg><\/svg><(\/?)TITLE> scale: exportingOptions.scale,
885 <\/svg><\/svg><(\/?)TITLE> svg: svg
886 <\/svg><\/svg><(\/?)TITLE> }, exportingOptions.formAttributes);
887  
888 <\/svg><\/svg><(\/?)TITLE> },
889  
890 <\/svg><\/svg><(\/?)TITLE> /**
891 <\/svg><\/svg><(\/?)TITLE> * Exporting module required. Clears away other elements in the page and
892 <\/svg><\/svg><(\/?)TITLE> * prints the chart as it is displayed. By default, when the exporting
893 <\/svg><\/svg><(\/?)TITLE> * module is enabled, a context button with a drop down menu in the upper
894 <\/svg><\/svg><(\/?)TITLE> * right corner accesses this function.
895 <\/svg><\/svg><(\/?)TITLE> *
896 <\/svg><\/svg><(\/?)TITLE> * @sample highcharts/members/chart-print/
897 <\/svg><\/svg><(\/?)TITLE> * Print from a HTML button
898 <\/svg><\/svg><(\/?)TITLE> */
899 <\/svg><\/svg><(\/?)TITLE> print: function() {
900  
901 <\/svg><\/svg><(\/?)TITLE> var chart = this,
902 <\/svg><\/svg><(\/?)TITLE> container = chart.container,
903 <\/svg><\/svg><(\/?)TITLE> origDisplay = [],
904 <\/svg><\/svg><(\/?)TITLE> origParent = container.parentNode,
905 <\/svg><\/svg><(\/?)TITLE> body = doc.body,
906 <\/svg><\/svg><(\/?)TITLE> childNodes = body.childNodes,
907 <\/svg><\/svg><(\/?)TITLE> printMaxWidth = chart.options.exporting.printMaxWidth,
908 <\/svg><\/svg><(\/?)TITLE> resetParams,
909 <\/svg><\/svg><(\/?)TITLE> handleMaxWidth;
910  
911 <\/svg><\/svg><(\/?)TITLE> if (chart.isPrinting) { // block the button while in printing mode
912 <\/svg><\/svg><(\/?)TITLE> return;
913 <\/svg><\/svg><(\/?)TITLE> }
914  
915 <\/svg><\/svg><(\/?)TITLE> chart.isPrinting = true;
916 <\/svg><\/svg><(\/?)TITLE> chart.pointer.reset(null, 0);
917  
918 <\/svg><\/svg><(\/?)TITLE> fireEvent(chart, 'beforePrint');
919  
920 <\/svg><\/svg><(\/?)TITLE> // Handle printMaxWidth
921 <\/svg><\/svg><(\/?)TITLE> handleMaxWidth = printMaxWidth && chart.chartWidth > printMaxWidth;
922 <\/svg><\/svg><(\/?)TITLE> if (handleMaxWidth) {
923 <\/svg><\/svg><(\/?)TITLE> resetParams = [chart.options.chart.width, undefined, false];
924 <\/svg><\/svg><(\/?)TITLE> chart.setSize(printMaxWidth, undefined, false);
925 <\/svg><\/svg><(\/?)TITLE> }
926  
927 <\/svg><\/svg><(\/?)TITLE> // hide all body content
928 <\/svg><\/svg><(\/?)TITLE> each(childNodes, function(node, i) {
929 <\/svg><\/svg><(\/?)TITLE> if (node.nodeType === 1) {
930 <\/svg><\/svg><(\/?)TITLE> origDisplay[i] = node.style.display;
931 <\/svg><\/svg><(\/?)TITLE> node.style.display = 'none';
932 <\/svg><\/svg><(\/?)TITLE> }
933 <\/svg><\/svg><(\/?)TITLE> });
934  
935 <\/svg><\/svg><(\/?)TITLE> // pull out the chart
936 <\/svg><\/svg><(\/?)TITLE> body.appendChild(container);
937  
938 <\/svg><\/svg><(\/?)TITLE> // print
939 <\/svg><\/svg><(\/?)TITLE> win.focus(); // #1510
940 <\/svg><\/svg><(\/?)TITLE> win.print();
941  
942 <\/svg><\/svg><(\/?)TITLE> // allow the browser to prepare before reverting
943 <\/svg><\/svg><(\/?)TITLE> setTimeout(function() {
944  
945 <\/svg><\/svg><(\/?)TITLE> // put the chart back in
946 <\/svg><\/svg><(\/?)TITLE> origParent.appendChild(container);
947  
948 <\/svg><\/svg><(\/?)TITLE> // restore all body content
949 <\/svg><\/svg><(\/?)TITLE> each(childNodes, function(node, i) {
950 <\/svg><\/svg><(\/?)TITLE> if (node.nodeType === 1) {
951 <\/svg><\/svg><(\/?)TITLE> node.style.display = origDisplay[i];
952 <\/svg><\/svg><(\/?)TITLE> }
953 <\/svg><\/svg><(\/?)TITLE> });
954  
955 <\/svg><\/svg><(\/?)TITLE> chart.isPrinting = false;
956  
957 <\/svg><\/svg><(\/?)TITLE> // Reset printMaxWidth
958 <\/svg><\/svg><(\/?)TITLE> if (handleMaxWidth) {
959 <\/svg><\/svg><(\/?)TITLE> chart.setSize.apply(chart, resetParams);
960 <\/svg><\/svg><(\/?)TITLE> }
961  
962 <\/svg><\/svg><(\/?)TITLE> fireEvent(chart, 'afterPrint');
963  
964 <\/svg><\/svg><(\/?)TITLE> }, 1000);
965  
966 <\/svg><\/svg><(\/?)TITLE> },
967  
968 <\/svg><\/svg><(\/?)TITLE> /**
969 <\/svg><\/svg><(\/?)TITLE> * Display a popup menu for choosing the export type.
970 <\/svg><\/svg><(\/?)TITLE> *
971 <\/svg><\/svg><(\/?)TITLE> * @private
972 <\/svg><\/svg><(\/?)TITLE> *
973 <\/svg><\/svg><(\/?)TITLE> * @param {String} className An identifier for the menu
974 <\/svg><\/svg><(\/?)TITLE> * @param {Array} items A collection with text and onclicks for the items
975 <\/svg><\/svg><(\/?)TITLE> * @param {Number} x The x position of the opener button
976 <\/svg><\/svg><(\/?)TITLE> * @param {Number} y The y position of the opener button
977 <\/svg><\/svg><(\/?)TITLE> * @param {Number} width The width of the opener button
978 <\/svg><\/svg><(\/?)TITLE> * @param {Number} height The height of the opener button
979 <\/svg><\/svg><(\/?)TITLE> */
980 <\/svg><\/svg><(\/?)TITLE> contextMenu: function(className, items, x, y, width, height, button) {
981 <\/svg><\/svg><(\/?)TITLE> var chart = this,
982 <\/svg><\/svg><(\/?)TITLE> navOptions = chart.options.navigation,
983 <\/svg><\/svg><(\/?)TITLE> chartWidth = chart.chartWidth,
984 <\/svg><\/svg><(\/?)TITLE> chartHeight = chart.chartHeight,
985 <\/svg><\/svg><(\/?)TITLE> cacheName = 'cache-' + className,
986 <\/svg><\/svg><(\/?)TITLE> menu = chart[cacheName],
987 <\/svg><\/svg><(\/?)TITLE> menuPadding = Math.max(width, height), // for mouse leave detection
988 <\/svg><\/svg><(\/?)TITLE> innerMenu,
989 <\/svg><\/svg><(\/?)TITLE> hide,
990 <\/svg><\/svg><(\/?)TITLE> menuStyle;
991  
992 <\/svg><\/svg><(\/?)TITLE> // create the menu only the first time
993 <\/svg><\/svg><(\/?)TITLE> if (!menu) {
994  
995 <\/svg><\/svg><(\/?)TITLE> // create a HTML element above the SVG
996 <\/svg><\/svg><(\/?)TITLE> chart[cacheName] = menu = createElement('div', {
997 <\/svg><\/svg><(\/?)TITLE> className: className
998 <\/svg><\/svg><(\/?)TITLE> }, {
999 <\/svg><\/svg><(\/?)TITLE> position: 'absolute',
1000 <\/svg><\/svg><(\/?)TITLE> zIndex: 1000,
1001 <\/svg><\/svg><(\/?)TITLE> padding: menuPadding + 'px'
1002 <\/svg><\/svg><(\/?)TITLE> }, chart.container);
1003  
1004 <\/svg><\/svg><(\/?)TITLE> innerMenu = createElement('div', {
1005 <\/svg><\/svg><(\/?)TITLE> className: 'highcharts-menu'
1006 <\/svg><\/svg><(\/?)TITLE> }, null, menu);
1007  
1008  
1009 <\/svg><\/svg><(\/?)TITLE> // Presentational CSS
1010 <\/svg><\/svg><(\/?)TITLE> css(innerMenu, extend({
1011 <\/svg><\/svg><(\/?)TITLE> MozBoxShadow: '3px 3px 10px #888',
1012 <\/svg><\/svg><(\/?)TITLE> WebkitBoxShadow: '3px 3px 10px #888',
1013 <\/svg><\/svg><(\/?)TITLE> boxShadow: '3px 3px 10px #888'
1014 <\/svg><\/svg><(\/?)TITLE> }, navOptions.menuStyle));
1015  
1016  
1017 <\/svg><\/svg><(\/?)TITLE> // hide on mouse out
1018 <\/svg><\/svg><(\/?)TITLE> hide = function() {
1019 <\/svg><\/svg><(\/?)TITLE> css(menu, {
1020 <\/svg><\/svg><(\/?)TITLE> display: 'none'
1021 <\/svg><\/svg><(\/?)TITLE> });
1022 <\/svg><\/svg><(\/?)TITLE> if (button) {
1023 <\/svg><\/svg><(\/?)TITLE> button.setState(0);
1024 <\/svg><\/svg><(\/?)TITLE> }
1025 <\/svg><\/svg><(\/?)TITLE> chart.openMenu = false;
1026 <\/svg><\/svg><(\/?)TITLE> };
1027  
1028 <\/svg><\/svg><(\/?)TITLE> // Hide the menu some time after mouse leave (#1357)
1029 <\/svg><\/svg><(\/?)TITLE> chart.exportEvents.push(
1030 <\/svg><\/svg><(\/?)TITLE> addEvent(menu, 'mouseleave', function() {
1031 <\/svg><\/svg><(\/?)TITLE> menu.hideTimer = setTimeout(hide, 500);
1032 <\/svg><\/svg><(\/?)TITLE> }),
1033 <\/svg><\/svg><(\/?)TITLE> addEvent(menu, 'mouseenter', function() {
1034 <\/svg><\/svg><(\/?)TITLE> clearTimeout(menu.hideTimer);
1035 <\/svg><\/svg><(\/?)TITLE> }),
1036  
1037 <\/svg><\/svg><(\/?)TITLE> // Hide it on clicking or touching outside the menu (#2258, #2335,
1038 <\/svg><\/svg><(\/?)TITLE> // #2407)
1039 <\/svg><\/svg><(\/?)TITLE> addEvent(doc, 'mouseup', function(e) {
1040 <\/svg><\/svg><(\/?)TITLE> if (!chart.pointer.inClass(e.target, className)) {
1041 <\/svg><\/svg><(\/?)TITLE> hide();
1042 <\/svg><\/svg><(\/?)TITLE> }
1043 <\/svg><\/svg><(\/?)TITLE> })
1044 <\/svg><\/svg><(\/?)TITLE> );
1045  
1046 <\/svg><\/svg><(\/?)TITLE> // create the items
1047 <\/svg><\/svg><(\/?)TITLE> each(items, function(item) {
1048  
1049 <\/svg><\/svg><(\/?)TITLE> if (typeof item === 'string') {
1050 <\/svg><\/svg><(\/?)TITLE> item = chart.options.exporting.menuItemDefinitions[item];
1051 <\/svg><\/svg><(\/?)TITLE> }
1052  
1053 <\/svg><\/svg><(\/?)TITLE> if (H.isObject(item, true)) {
1054 <\/svg><\/svg><(\/?)TITLE> var element;
1055  
1056 <\/svg><\/svg><(\/?)TITLE> if (item.separator) {
1057 <\/svg><\/svg><(\/?)TITLE> element = createElement('hr', null, null, innerMenu);
1058  
1059 <\/svg><\/svg><(\/?)TITLE> } else {
1060 <\/svg><\/svg><(\/?)TITLE> element = createElement('div', {
1061 <\/svg><\/svg><(\/?)TITLE> className: 'highcharts-menu-item',
1062 <\/svg><\/svg><(\/?)TITLE> onclick: function(e) {
1063 <\/svg><\/svg><(\/?)TITLE> if (e) { // IE7
1064 <\/svg><\/svg><(\/?)TITLE> e.stopPropagation();
1065 <\/svg><\/svg><(\/?)TITLE> }
1066 <\/svg><\/svg><(\/?)TITLE> hide();
1067 <\/svg><\/svg><(\/?)TITLE> if (item.onclick) {
1068 <\/svg><\/svg><(\/?)TITLE> item.onclick.apply(chart, arguments);
1069 <\/svg><\/svg><(\/?)TITLE> }
1070 <\/svg><\/svg><(\/?)TITLE> },
1071 <\/svg><\/svg><(\/?)TITLE> innerHTML: item.text || chart.options.lang[item.textKey]
1072 <\/svg><\/svg><(\/?)TITLE> }, null, innerMenu);
1073  
1074  
1075 <\/svg><\/svg><(\/?)TITLE> element.onmouseover = function() {
1076 <\/svg><\/svg><(\/?)TITLE> css(this, navOptions.menuItemHoverStyle);
1077 <\/svg><\/svg><(\/?)TITLE> };
1078 <\/svg><\/svg><(\/?)TITLE> element.onmouseout = function() {
1079 <\/svg><\/svg><(\/?)TITLE> css(this, navOptions.menuItemStyle);
1080 <\/svg><\/svg><(\/?)TITLE> };
1081 <\/svg><\/svg><(\/?)TITLE> css(element, extend({
1082 <\/svg><\/svg><(\/?)TITLE> cursor: 'pointer'
1083 <\/svg><\/svg><(\/?)TITLE> }, navOptions.menuItemStyle));
1084  
1085 <\/svg><\/svg><(\/?)TITLE> }
1086  
1087 <\/svg><\/svg><(\/?)TITLE> // Keep references to menu divs to be able to destroy them
1088 <\/svg><\/svg><(\/?)TITLE> chart.exportDivElements.push(element);
1089 <\/svg><\/svg><(\/?)TITLE> }
1090 <\/svg><\/svg><(\/?)TITLE> });
1091  
1092 <\/svg><\/svg><(\/?)TITLE> // Keep references to menu and innerMenu div to be able to destroy them
1093 <\/svg><\/svg><(\/?)TITLE> chart.exportDivElements.push(innerMenu, menu);
1094  
1095 <\/svg><\/svg><(\/?)TITLE> chart.exportMenuWidth = menu.offsetWidth;
1096 <\/svg><\/svg><(\/?)TITLE> chart.exportMenuHeight = menu.offsetHeight;
1097 <\/svg><\/svg><(\/?)TITLE> }
1098  
1099 <\/svg><\/svg><(\/?)TITLE> menuStyle = {
1100 <\/svg><\/svg><(\/?)TITLE> display: 'block'
1101 <\/svg><\/svg><(\/?)TITLE> };
1102  
1103 <\/svg><\/svg><(\/?)TITLE> // if outside right, right align it
1104 <\/svg><\/svg><(\/?)TITLE> if (x + chart.exportMenuWidth > chartWidth) {
1105 <\/svg><\/svg><(\/?)TITLE> menuStyle.right = (chartWidth - x - width - menuPadding) + 'px';
1106 <\/svg><\/svg><(\/?)TITLE> } else {
1107 <\/svg><\/svg><(\/?)TITLE> menuStyle.left = (x - menuPadding) + 'px';
1108 <\/svg><\/svg><(\/?)TITLE> }
1109 <\/svg><\/svg><(\/?)TITLE> // if outside bottom, bottom align it
1110 <\/svg><\/svg><(\/?)TITLE> if (y + height + chart.exportMenuHeight > chartHeight && button.alignOptions.verticalAlign !== 'top') {
1111 <\/svg><\/svg><(\/?)TITLE> menuStyle.bottom = (chartHeight - y - menuPadding) + 'px';
1112 <\/svg><\/svg><(\/?)TITLE> } else {
1113 <\/svg><\/svg><(\/?)TITLE> menuStyle.top = (y + height - menuPadding) + 'px';
1114 <\/svg><\/svg><(\/?)TITLE> }
1115  
1116 <\/svg><\/svg><(\/?)TITLE> css(menu, menuStyle);
1117 <\/svg><\/svg><(\/?)TITLE> chart.openMenu = true;
1118 <\/svg><\/svg><(\/?)TITLE> },
1119  
1120 <\/svg><\/svg><(\/?)TITLE> /**
1121 <\/svg><\/svg><(\/?)TITLE> * Add the export button to the chart, with options.
1122 <\/svg><\/svg><(\/?)TITLE> *
1123 <\/svg><\/svg><(\/?)TITLE> * @private
1124 <\/svg><\/svg><(\/?)TITLE> */
1125 <\/svg><\/svg><(\/?)TITLE> addButton: function(options) {
1126 <\/svg><\/svg><(\/?)TITLE> var chart = this,
1127 <\/svg><\/svg><(\/?)TITLE> renderer = chart.renderer,
1128 <\/svg><\/svg><(\/?)TITLE> btnOptions = merge(chart.options.navigation.buttonOptions, options),
1129 <\/svg><\/svg><(\/?)TITLE> onclick = btnOptions.onclick,
1130 <\/svg><\/svg><(\/?)TITLE> menuItems = btnOptions.menuItems,
1131 <\/svg><\/svg><(\/?)TITLE> symbol,
1132 <\/svg><\/svg><(\/?)TITLE> button,
1133 <\/svg><\/svg><(\/?)TITLE> symbolSize = btnOptions.symbolSize || 12;
1134 <\/svg><\/svg><(\/?)TITLE> if (!chart.btnCount) {
1135 <\/svg><\/svg><(\/?)TITLE> chart.btnCount = 0;
1136 <\/svg><\/svg><(\/?)TITLE> }
1137  
1138 <\/svg><\/svg><(\/?)TITLE> // Keeps references to the button elements
1139 <\/svg><\/svg><(\/?)TITLE> if (!chart.exportDivElements) {
1140 <\/svg><\/svg><(\/?)TITLE> chart.exportDivElements = [];
1141 <\/svg><\/svg><(\/?)TITLE> chart.exportSVGElements = [];
1142 <\/svg><\/svg><(\/?)TITLE> }
1143  
1144 <\/svg><\/svg><(\/?)TITLE> if (btnOptions.enabled === false) {
1145 <\/svg><\/svg><(\/?)TITLE> return;
1146 <\/svg><\/svg><(\/?)TITLE> }
1147  
1148  
1149 <\/svg><\/svg><(\/?)TITLE> var attr = btnOptions.theme,
1150 <\/svg><\/svg><(\/?)TITLE> states = attr.states,
1151 <\/svg><\/svg><(\/?)TITLE> hover = states && states.hover,
1152 <\/svg><\/svg><(\/?)TITLE> select = states && states.select,
1153 <\/svg><\/svg><(\/?)TITLE> callback;
1154  
1155 <\/svg><\/svg><(\/?)TITLE> delete attr.states;
1156  
1157 <\/svg><\/svg><(\/?)TITLE> if (onclick) {
1158 <\/svg><\/svg><(\/?)TITLE> callback = function(e) {
1159 <\/svg><\/svg><(\/?)TITLE> e.stopPropagation();
1160 <\/svg><\/svg><(\/?)TITLE> onclick.call(chart, e);
1161 <\/svg><\/svg><(\/?)TITLE> };
1162  
1163 <\/svg><\/svg><(\/?)TITLE> } else if (menuItems) {
1164 <\/svg><\/svg><(\/?)TITLE> callback = function() {
1165 <\/svg><\/svg><(\/?)TITLE> chart.contextMenu(
1166 <\/svg><\/svg><(\/?)TITLE> button.menuClassName,
1167 <\/svg><\/svg><(\/?)TITLE> menuItems,
1168 <\/svg><\/svg><(\/?)TITLE> button.translateX,
1169 <\/svg><\/svg><(\/?)TITLE> button.translateY,
1170 <\/svg><\/svg><(\/?)TITLE> button.width,
1171 <\/svg><\/svg><(\/?)TITLE> button.height,
1172 <\/svg><\/svg><(\/?)TITLE> button
1173 <\/svg><\/svg><(\/?)TITLE> );
1174 <\/svg><\/svg><(\/?)TITLE> button.setState(2);
1175 <\/svg><\/svg><(\/?)TITLE> };
1176 <\/svg><\/svg><(\/?)TITLE> }
1177  
1178  
1179 <\/svg><\/svg><(\/?)TITLE> if (btnOptions.text && btnOptions.symbol) {
1180 <\/svg><\/svg><(\/?)TITLE> attr.paddingLeft = pick(attr.paddingLeft, 25);
1181  
1182 <\/svg><\/svg><(\/?)TITLE> } else if (!btnOptions.text) {
1183 <\/svg><\/svg><(\/?)TITLE> extend(attr, {
1184 <\/svg><\/svg><(\/?)TITLE> width: btnOptions.width,
1185 <\/svg><\/svg><(\/?)TITLE> height: btnOptions.height,
1186 <\/svg><\/svg><(\/?)TITLE> padding: 0
1187 <\/svg><\/svg><(\/?)TITLE> });
1188 <\/svg><\/svg><(\/?)TITLE> }
1189  
1190 <\/svg><\/svg><(\/?)TITLE> button = renderer.button(btnOptions.text, 0, 0, callback, attr, hover, select)
1191 <\/svg><\/svg><(\/?)TITLE> .addClass(options.className)
1192 <\/svg><\/svg><(\/?)TITLE> .attr({
1193  
1194 <\/svg><\/svg><(\/?)TITLE> 'stroke-linecap': 'round',
1195  
1196 <\/svg><\/svg><(\/?)TITLE> title: chart.options.lang[btnOptions._titleKey],
1197 <\/svg><\/svg><(\/?)TITLE> zIndex: 3 // #4955
1198 <\/svg><\/svg><(\/?)TITLE> });
1199 <\/svg><\/svg><(\/?)TITLE> button.menuClassName = options.menuClassName || 'highcharts-menu-' + chart.btnCount++;
1200  
1201 <\/svg><\/svg><(\/?)TITLE> if (btnOptions.symbol) {
1202 <\/svg><\/svg><(\/?)TITLE> symbol = renderer.symbol(
1203 <\/svg><\/svg><(\/?)TITLE> btnOptions.symbol,
1204 <\/svg><\/svg><(\/?)TITLE> btnOptions.symbolX - (symbolSize / 2),
1205 <\/svg><\/svg><(\/?)TITLE> btnOptions.symbolY - (symbolSize / 2),
1206 <\/svg><\/svg><(\/?)TITLE> symbolSize,
1207 <\/svg><\/svg><(\/?)TITLE> symbolSize
1208 <\/svg><\/svg><(\/?)TITLE> )
1209 <\/svg><\/svg><(\/?)TITLE> .addClass('highcharts-button-symbol')
1210 <\/svg><\/svg><(\/?)TITLE> .attr({
1211 <\/svg><\/svg><(\/?)TITLE> zIndex: 1
1212 <\/svg><\/svg><(\/?)TITLE> }).add(button);
1213  
1214  
1215 <\/svg><\/svg><(\/?)TITLE> symbol.attr({
1216 <\/svg><\/svg><(\/?)TITLE> stroke: btnOptions.symbolStroke,
1217 <\/svg><\/svg><(\/?)TITLE> fill: btnOptions.symbolFill,
1218 <\/svg><\/svg><(\/?)TITLE> 'stroke-width': btnOptions.symbolStrokeWidth || 1
1219 <\/svg><\/svg><(\/?)TITLE> });
1220  
1221 <\/svg><\/svg><(\/?)TITLE> }
1222  
1223 <\/svg><\/svg><(\/?)TITLE> button.add()
1224 <\/svg><\/svg><(\/?)TITLE> .align(extend(btnOptions, {
1225 <\/svg><\/svg><(\/?)TITLE> width: button.width,
1226 <\/svg><\/svg><(\/?)TITLE> x: pick(btnOptions.x, chart.buttonOffset) // #1654
1227 <\/svg><\/svg><(\/?)TITLE> }), true, 'spacingBox');
1228  
1229 <\/svg><\/svg><(\/?)TITLE> chart.buttonOffset += (button.width + btnOptions.buttonSpacing) * (btnOptions.align === 'right' ? -1 : 1);
1230  
1231 <\/svg><\/svg><(\/?)TITLE> chart.exportSVGElements.push(button, symbol);
1232  
1233 <\/svg><\/svg><(\/?)TITLE> },
1234  
1235 <\/svg><\/svg><(\/?)TITLE> /**
1236 <\/svg><\/svg><(\/?)TITLE> * Destroy the export buttons.
1237 <\/svg><\/svg><(\/?)TITLE> *
1238 <\/svg><\/svg><(\/?)TITLE> * @private
1239 <\/svg><\/svg><(\/?)TITLE> */
1240 <\/svg><\/svg><(\/?)TITLE> destroyExport: function(e) {
1241 <\/svg><\/svg><(\/?)TITLE> var chart = e ? e.target : this,
1242 <\/svg><\/svg><(\/?)TITLE> exportSVGElements = chart.exportSVGElements,
1243 <\/svg><\/svg><(\/?)TITLE> exportDivElements = chart.exportDivElements,
1244 <\/svg><\/svg><(\/?)TITLE> exportEvents = chart.exportEvents,
1245 <\/svg><\/svg><(\/?)TITLE> cacheName;
1246  
1247 <\/svg><\/svg><(\/?)TITLE> // Destroy the extra buttons added
1248 <\/svg><\/svg><(\/?)TITLE> if (exportSVGElements) {
1249 <\/svg><\/svg><(\/?)TITLE> each(exportSVGElements, function(elem, i) {
1250  
1251 <\/svg><\/svg><(\/?)TITLE> // Destroy and null the svg/vml elements
1252 <\/svg><\/svg><(\/?)TITLE> if (elem) { // #1822
1253 <\/svg><\/svg><(\/?)TITLE> elem.onclick = elem.ontouchstart = null;
1254 <\/svg><\/svg><(\/?)TITLE> cacheName = 'cache-' + elem.menuClassName;
1255  
1256 <\/svg><\/svg><(\/?)TITLE> if (chart[cacheName]) {
1257 <\/svg><\/svg><(\/?)TITLE> delete chart[cacheName];
1258 <\/svg><\/svg><(\/?)TITLE> }
1259  
1260 <\/svg><\/svg><(\/?)TITLE> chart.exportSVGElements[i] = elem.destroy();
1261 <\/svg><\/svg><(\/?)TITLE> }
1262 <\/svg><\/svg><(\/?)TITLE> });
1263 <\/svg><\/svg><(\/?)TITLE> exportSVGElements.length = 0;
1264 <\/svg><\/svg><(\/?)TITLE> }
1265  
1266 <\/svg><\/svg><(\/?)TITLE> // Destroy the divs for the menu
1267 <\/svg><\/svg><(\/?)TITLE> if (exportDivElements) {
1268 <\/svg><\/svg><(\/?)TITLE> each(exportDivElements, function(elem, i) {
1269  
1270 <\/svg><\/svg><(\/?)TITLE> // Remove the event handler
1271 <\/svg><\/svg><(\/?)TITLE> clearTimeout(elem.hideTimer); // #5427
1272 <\/svg><\/svg><(\/?)TITLE> removeEvent(elem, 'mouseleave');
1273  
1274 <\/svg><\/svg><(\/?)TITLE> // Remove inline events
1275 <\/svg><\/svg><(\/?)TITLE> chart.exportDivElements[i] = elem.onmouseout = elem.onmouseover = elem.ontouchstart = elem.onclick = null;
1276  
1277 <\/svg><\/svg><(\/?)TITLE> // Destroy the div by moving to garbage bin
1278 <\/svg><\/svg><(\/?)TITLE> discardElement(elem);
1279 <\/svg><\/svg><(\/?)TITLE> });
1280 <\/svg><\/svg><(\/?)TITLE> exportDivElements.length = 0;
1281 <\/svg><\/svg><(\/?)TITLE> }
1282  
1283 <\/svg><\/svg><(\/?)TITLE> if (exportEvents) {
1284 <\/svg><\/svg><(\/?)TITLE> each(exportEvents, function(unbind) {
1285 <\/svg><\/svg><(\/?)TITLE> unbind();
1286 <\/svg><\/svg><(\/?)TITLE> });
1287 <\/svg><\/svg><(\/?)TITLE> exportEvents.length = 0;
1288 <\/svg><\/svg><(\/?)TITLE> }
1289 <\/svg><\/svg><(\/?)TITLE> }
1290 <\/svg><\/svg><(\/?)TITLE> });
1291  
1292  
1293  
1294  
1295 <\/svg><\/svg><(\/?)TITLE> symbols.menu = function(x, y, width, height) {
1296 <\/svg><\/svg><(\/?)TITLE> var arr = [
1297 <\/svg><\/svg><(\/?)TITLE> 'M', x, y + 2.5,
1298 <\/svg><\/svg><(\/?)TITLE> 'L', x + width, y + 2.5,
1299 <\/svg><\/svg><(\/?)TITLE> 'M', x, y + height / 2 + 0.5,
1300 <\/svg><\/svg><(\/?)TITLE> 'L', x + width, y + height / 2 + 0.5,
1301 <\/svg><\/svg><(\/?)TITLE> 'M', x, y + height - 1.5,
1302 <\/svg><\/svg><(\/?)TITLE> 'L', x + width, y + height - 1.5
1303 <\/svg><\/svg><(\/?)TITLE> ];
1304 <\/svg><\/svg><(\/?)TITLE> return arr;
1305 <\/svg><\/svg><(\/?)TITLE> };
1306  
1307 <\/svg><\/svg><(\/?)TITLE> // Add the buttons on chart load
1308 <\/svg><\/svg><(\/?)TITLE> Chart.prototype.renderExporting = function() {
1309 <\/svg><\/svg><(\/?)TITLE> var chart = this,
1310 <\/svg><\/svg><(\/?)TITLE> exportingOptions = chart.options.exporting,
1311 <\/svg><\/svg><(\/?)TITLE> buttons = exportingOptions.buttons,
1312 <\/svg><\/svg><(\/?)TITLE> isDirty = chart.isDirtyExporting || !chart.exportSVGElements;
1313  
1314 <\/svg><\/svg><(\/?)TITLE> chart.buttonOffset = 0;
1315 <\/svg><\/svg><(\/?)TITLE> if (chart.isDirtyExporting) {
1316 <\/svg><\/svg><(\/?)TITLE> chart.destroyExport();
1317 <\/svg><\/svg><(\/?)TITLE> }
1318  
1319 <\/svg><\/svg><(\/?)TITLE> if (isDirty && exportingOptions.enabled !== false) {
1320 <\/svg><\/svg><(\/?)TITLE> chart.exportEvents = [];
1321  
1322 <\/svg><\/svg><(\/?)TITLE> objectEach(buttons, function(button) {
1323 <\/svg><\/svg><(\/?)TITLE> chart.addButton(button);
1324 <\/svg><\/svg><(\/?)TITLE> });
1325  
1326 <\/svg><\/svg><(\/?)TITLE> chart.isDirtyExporting = false;
1327 <\/svg><\/svg><(\/?)TITLE> }
1328  
1329 <\/svg><\/svg><(\/?)TITLE> // Destroy the export elements at chart destroy
1330 <\/svg><\/svg><(\/?)TITLE> addEvent(chart, 'destroy', chart.destroyExport);
1331 <\/svg><\/svg><(\/?)TITLE> };
1332  
1333 <\/svg><\/svg><(\/?)TITLE> Chart.prototype.callbacks.push(function(chart) {
1334  
1335 <\/svg><\/svg><(\/?)TITLE> function update(prop, options, redraw) {
1336 <\/svg><\/svg><(\/?)TITLE> chart.isDirtyExporting = true;
1337 <\/svg><\/svg><(\/?)TITLE> merge(true, chart.options[prop], options);
1338 <\/svg><\/svg><(\/?)TITLE> if (pick(redraw, true)) {
1339 <\/svg><\/svg><(\/?)TITLE> chart.redraw();
1340 <\/svg><\/svg><(\/?)TITLE> }
1341  
1342 <\/svg><\/svg><(\/?)TITLE> }
1343  
1344 <\/svg><\/svg><(\/?)TITLE> chart.renderExporting();
1345  
1346 <\/svg><\/svg><(\/?)TITLE> addEvent(chart, 'redraw', chart.renderExporting);
1347  
1348 <\/svg><\/svg><(\/?)TITLE> // Add update methods to handle chart.update and chart.exporting.update
1349 <\/svg><\/svg><(\/?)TITLE> // and chart.navigation.update.
1350 <\/svg><\/svg><(\/?)TITLE> each(['exporting', 'navigation'], function(prop) {
1351 <\/svg><\/svg><(\/?)TITLE> chart[prop] = {
1352 <\/svg><\/svg><(\/?)TITLE> update: function(options, redraw) {
1353 <\/svg><\/svg><(\/?)TITLE> update(prop, options, redraw);
1354 <\/svg><\/svg><(\/?)TITLE> }
1355 <\/svg><\/svg><(\/?)TITLE> };
1356 <\/svg><\/svg><(\/?)TITLE> });
1357  
1358 <\/svg><\/svg><(\/?)TITLE> // Uncomment this to see a button directly below the chart, for quick
1359 <\/svg><\/svg><(\/?)TITLE> // testing of export
1360 <\/svg><\/svg><(\/?)TITLE> /*
1361 <\/svg><\/svg><(\/?)TITLE> if (!chart.renderer.forExport) {
1362 <\/svg><\/svg><(\/?)TITLE> var button;
1363  
1364 <\/svg><\/svg><(\/?)TITLE> // View SVG Image
1365 <\/svg><\/svg><(\/?)TITLE> button = doc.createElement('button');
1366 <\/svg><\/svg><(\/?)TITLE> button.innerHTML = 'View SVG Image';
1367 <\/svg><\/svg><(\/?)TITLE> chart.renderTo.parentNode.appendChild(button);
1368 <\/svg><\/svg><(\/?)TITLE> button.onclick = function () {
1369 <\/svg><\/svg><(\/?)TITLE> var div = doc.createElement('div');
1370 <\/svg><\/svg><(\/?)TITLE> div.innerHTML = chart.getSVGForExport();
1371 <\/svg><\/svg><(\/?)TITLE> chart.renderTo.parentNode.appendChild(div);
1372 <\/svg><\/svg><(\/?)TITLE> };
1373  
1374 <\/svg><\/svg><(\/?)TITLE> // View SVG Source
1375 <\/svg><\/svg><(\/?)TITLE> button = doc.createElement('button');
1376 <\/svg><\/svg><(\/?)TITLE> button.innerHTML = 'View SVG Source';
1377 <\/svg><\/svg><(\/?)TITLE> chart.renderTo.parentNode.appendChild(button);
1378 <\/svg><\/svg><(\/?)TITLE> button.onclick = function () {
1379 <\/svg><\/svg><(\/?)TITLE> var pre = doc.createElement('pre');
1380 <\/svg><\/svg><(\/?)TITLE> pre.innerHTML = chart.getSVGForExport()
1381 <\/svg><\/svg><(\/?)TITLE> .replace(/</g, '\n&lt;')
1382 <\/svg><\/svg><(\/?)TITLE> .replace(/>/g, '&gt;');
1383 <\/svg><\/svg><(\/?)TITLE> chart.renderTo.parentNode.appendChild(pre);
1384 <\/svg><\/svg><(\/?)TITLE> };
1385 <\/svg><\/svg><(\/?)TITLE> }
1386 <\/svg><\/svg><(\/?)TITLE> // */
1387 <\/svg><\/svg><(\/?)TITLE> });
1388  
1389 <\/svg><\/svg><(\/?)TITLE> }(Highcharts));
1390 <\/svg><\/svg><(\/?)TITLE>}));