Skip to content

Commit

Permalink
Merge pull request #4598 from rs-tsc/feature/toolbar-png-export-file-…
Browse files Browse the repository at this point in the history
…width

Feature/toolbar png export file width
  • Loading branch information
junedchhipa authored Aug 19, 2024
2 parents 614016f + 091c374 commit 2a04c09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/Exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ class Exports {
}

exportToPng() {
this.dataURI().then(({ imgURI, blob }) => {
const scale = this.w.config.chart.toolbar.export.scale
const width = this.w.config.chart.toolbar.export.width
const option = scale ? {scale: scale}: width? {width: width}: undefined
this.dataURI(option).then(({ imgURI, blob }) => {
if (blob) {
navigator.msSaveOrOpenBlob(blob, this.w.globals.chartID + '.png')
} else {
Expand Down

0 comments on commit 2a04c09

Please sign in to comment.