Home › forums › Chart Support › Rectangular Area chart to scale
I’m trying to create a rectangular area chart to scale, where the width and the height of the rectangle can vary. However it appears that canvas js has a predetermined aspect ration. I’m looking for a way to bypass this.
Please refer to my js fiddle below for clarification
Thank you in advance for your help.
CanvasJS Chart automatically sets the height and width of the chart according to container’s dimensions. If the values are not set for the container, it takes the default values. So you can just set the width and height of the container in which you are going to place the chart as shown below:
<div id="chartContainer" style="height: 300px; width: 500px;">
You must be logged in to reply to this topic.