Skip to content

Commit 09f421d

Browse files
authored
Merge pull request #1156 from data-for-change/1136-bug-axis-partial
change to const canvas height and width in download
2 parents 701c06c + 61c5fec commit 09f421d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/to-image.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export const widgetToImageH2I = (fileName: string, widgetElement: HTMLElement) =
1717

1818
// https://github.com/bubkoo/html-to-image
1919
const usingHtml2Image = (fileName: string, widgetElement: HTMLElement, scale = DEFAULT_SCALE) => {
20-
const canvasWidth = widgetElement.offsetWidth * scale;
21-
const canvasHeight = widgetElement.offsetHeight * scale;
20+
const canvasWidth = 3300;
21+
const canvasHeight = 3300;
2222

2323
htmlToImage.toPng(widgetElement, {
2424
canvasWidth,

0 commit comments

Comments
 (0)