Skip to content

Commit

Permalink
Merge pull request #1156 from data-for-change/1136-bug-axis-partial
Browse files Browse the repository at this point in the history
change to const canvas height and width in download
  • Loading branch information
atalyaalon authored Oct 31, 2024
2 parents 701c06c + 61c5fec commit 09f421d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/to-image.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export const widgetToImageH2I = (fileName: string, widgetElement: HTMLElement) =

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

htmlToImage.toPng(widgetElement, {
canvasWidth,
Expand Down

0 comments on commit 09f421d

Please sign in to comment.