Export chart with a fixed width/height #3329
Unanswered
invisibled
asked this question in
Q&A
Replies: 1 comment
-
Old question, but is there maybe a solution for it? Anybody got a good idea? :-) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to create pdf exports for my pages that include Apexcharts. The only issue I am having is that the height of the exported chart seems to be affected by the width of the browser, making it impossible to imbed the same sized image into my pdf. For clarity, my chart is a fixed height but is set to 70% of the browser. So in the browser it's always the same height but stretches in width.
This is my export code
const { imgURI } = await ApexCharts.exec('TurnoverChart', 'dataURI', { width: 500 })
and it exports the chart always at 500px, but depending on the browser width, the height changes.So what i'm looking for is to get the chart exported at a fixed size, lets say 500 width by 500 height. Is this possible? I've thought about rendering a chart through an api endpoint with a fixed size then sending the base64 back but i've love to not do that if this is just some wierd thing.
Beta Was this translation helpful? Give feedback.
All reactions