score:1
the issue was that canvas.todatauri does not work on IE if the div contains SVG . so i used canvasg.. replaced the above code by :
var chart = $('#main-content').highcharts();
var svg = chart.getSVG({
exporting: {
sourceWidth: chart.chartWidth,
sourceHeight: chart.chartHeight
}
});
var mycanvas = document.createElement('canvas');
canvg(mycanvas, svg);
var imgtest = mycanvas.toDataURL("image/JPEG");
doc.addImage(mycanvas.toDataURL("image/JPEG"), 'PNG', 0, 50, 440, 300);
score:0
I have faced the similar issue with IE11 while capturing the highchart charts which generates the svg charts. We used the technique of converting all svg images to canvas. Place the newly created canvas at svg. Now capture the dom and print/download it. Once print/download is done remove the canvas from dom again. It was working on chrome, FF and IE. We used the canvg npm module to convert svg to canvas as specified in the answer 1 by ibrahim noureddine
Source: stackoverflow.com
Related Query
- html2canvas of a Highcharts chart not working fine on IE
- HIghcharts & Bootstrap: Chart on Tab 2 is not appearing. Though First chart is working fine
- Highcharts Bar Chart Zoom not working
- HighCharts pointPlacement option not working in a single column chart
- Highcharts Line Chart Drill down not working properly
- Simple Highcharts chart not working in Firefox
- SetData() not working on Change Event HighCharts Pie Chart
- Highcharts data from a variable is not working but from works fine from an array
- save chart button of stock tool chart not working in highcharts
- HighCharts not working on Safari but works fine on Firefox and Chrome
- highcharts tooltip not working properly for hacked gantt chart
- Highcharts Export Service Gantt Chart not working
- Highcharts setData on pie chart not working
- Highcharts datalabel 'callout' shape not working for donut chart
- HighCharts Arearange Chart not working
- Buttons not working on subsequent tabs to redraw chart in Highcharts
- Highcharts chart event load not working for wordcloud
- Standalone simple chart not working - highcharts
- Angular Highcharts Radial Bar Chart not working as expected
- Highcharts Javascript - Synchronize Chart and Table not working - Cant read property cell of undefined
- Highcharts - legend titles rotation is not working fine in IE10
- PIE Chart is not working in IE 8 with HighCharts
- Radar Chart Not working in React Highcharts
- Highcharts packed bubble chart not working for negative values
- The RTL language (Arabic) is not working with HighCharts pie chart correctly, how can I fix this?
- Dynamically changing Highcharts Theme through Jquery code not working
- How do I rotate my HighCharts bar chart so its vertical, not horizontal?
- Highcharts yAxis max not working
- Highcharts saying undefined is not a function when trying to add a new chart
- Using html2canvas to render a highcharts chart to pdf doesn't work on IE and Firefox
More Query from same tag
- How can I do a dual axis using highcharter library?
- Javascript variable not working inside of highcharts
- Adding a string to highcharts tooltip based on a separate data series
- Highcharts Stacked Range z-Index
- Highcharts with JSON
- Printing a highchart to show data for all the points
- Highcharts Pie Chart Label Threshold
- Editing Highcharts.js donut data programmatically va JS
- Best way to add different colours based on conditions to bargraphs plotted with Highcharts.js
- How to add dotted line to a country in Africa map?
- Highcharts bubble chart with updating default colors
- Showing only the first custom label. Highcharts
- Ordering the stacking in a highcharts bar chart in R
- is it possible to add a legend for bubble size in high charts?
- Highchat yaxis offset property moves grid lines as well
- Adding Total Column to Highcharts column range
- Pie chart slice - center of mass
- Highcharts : Info about clicked legend item pass to controller
- Passing null in Highcharts line graphs
- How to use react-highcharts to plot bell curve
- Create a highchart graphic using angular.js
- How do i synchronize multiple(highcharts)charts in angular2
- How to use highmaps in react?
- How do I add a tooltip to the x-axis labels in highcharts?
- How to show dates in xAxis using Highcharts.js
- Highcharts: remove all the spacing
- Accessing Value of JSON and use it in Highcharts
- Hide Space in a stack of bar in HighChart
- Highchart can't be displayed
- How to add a category ID to High Charts Category