diff --git a/js/highcharts.src.js b/js/highcharts.src.js index 92bc505acea..5fdb639710f 100644 --- a/js/highcharts.src.js +++ b/js/highcharts.src.js @@ -6219,6 +6219,7 @@ Point.prototype = { var point = this, series = point.series; + point.options = options; // onedimensional array input if (typeof options == 'number' || options === null) { @@ -6230,7 +6231,6 @@ Point.prototype = { // copy options directly to point extend(point, options); - point.options = options; } // categorized data with name in first position diff --git a/js/modules/exporting.src.js b/js/modules/exporting.src.js index 33a2d72fa5e..07f8500373e 100644 --- a/js/modules/exporting.src.js +++ b/js/modules/exporting.src.js @@ -178,6 +178,9 @@ extend (Chart.prototype, { chartCopy, sandbox, svg, + seriesOptions, + pointOptions, + pointMarker, options = merge(chart.options, additionalOptions); // copy the options and add extra options // IE compatibility hack for generating SVG content that it doesn't really understand @@ -206,16 +209,33 @@ extend (Chart.prototype, { }); options.exporting.enabled = false; // hide buttons in print options.chart.plotBackgroundImage = null; // the converter doesn't handle images - each (options.series, function(serie) { - serie.animation = false;// turn off animation + + // prepare for replicating the chart + options.series = []; + each (chart.series, function(serie) { + seriesOptions = serie.options; + + seriesOptions.animation = false; // turn off animation + seriesOptions.showCheckbox = false; - each (serie.data, function(point) { // turn off symbols - if (point && point.marker && /^url\(/.test(point.marker.symbol)) { - delete point.marker.symbol; + seriesOptions.data = []; + each(serie.data, function(point) { + pointOptions = typeof point.options == 'number' ? + { y: point.y } : + point.options; + pointOptions.x = point.x; + seriesOptions.data.push(pointOptions); // copy fresh updated data + + // remove image markers + pointMarker = point.options.marker; + if (pointMarker && /^url\(/.test(pointMarker.symbol)) { + delete pointMarker.symbol; } - }); + }); + + options.series.push(seriesOptions); }); - + // generate the chart copy chartCopy = new Highcharts.Chart(options);