Hi there, I’m currently trying to change a specific iFrame width and height.
I’m using a POST API to generate and customize the chart, and then post it. Here’s an example:
'chart': {
'type': 'bar',
'width': 2000,
'height': 1200,
'data': {
'labels': ['Q1', 'Q2', 'Q3', 'Q4'],
}),
'datasets': [{
'backgroundColor': 'rgb(75, 192, 192)',
'data': [100, 200, 300, 400]
}]
}
}
So, ideally, I would pass the Chart’s width and height trough this POST url, however, I don’t see any results.
I noticed that if I change the iFrame’s width and height, like the following example, it does change the Chart size, but maintains the aspect ratio (does not adapt do the given sizes).
<iframe id="gf1" frameborder="0" width="2000" height="1200"></iframe>
Is there an alternative or am I doing something wrong?