Home Forums Chart Support Rectangular Area chart to scale

Rectangular Area chart to scale

Viewing 2 posts - 1 through 2 (of 2 total)
  • #31938


    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

    JS Fiddle

    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;">

    Indranil Deo
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.