highcharts-export-server
Advanced tools
Comparing version 0.1.12 to 0.1.13
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"bin": { | ||
@@ -11,0 +11,0 @@ "highcharts-export-server": "./bin/cli.js" |
@@ -159,2 +159,8 @@ /* | ||
if (data.svgstr) { | ||
page.evaluate(function () { | ||
document.body.style.margin = '0'; | ||
}); | ||
} | ||
//If the width is set, calculate a new zoom factor | ||
@@ -167,3 +173,3 @@ if (data.width && parseFloat(data.width) > 0) { | ||
page.zoomFactor = data.scale; | ||
} | ||
} | ||
@@ -176,3 +182,3 @@ clipW = page.evaluate(function (scale) { | ||
return (document.querySelector('svg').height.baseVal.value * scale); | ||
}, data.scale); | ||
}, data.scale || 1); | ||
@@ -188,3 +194,5 @@ page.clipRect = { | ||
width: clipW, | ||
height: clipH | ||
height: clipH, | ||
top: 0, | ||
left: 0 | ||
}; | ||
@@ -211,2 +219,9 @@ | ||
//HANDLE RENDERING | ||
if (data.format === 'jpeg') { | ||
page.evaluate(function () { | ||
document.body.style.backgroundColor = 'white'; | ||
}); | ||
} | ||
if (data.format === 'svg') { | ||
@@ -213,0 +228,0 @@ if (data.svgstr && !data.chart) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105352
1593