Chart dimensions in TypeScript Chart control
18 Nov 20181 minute to read
Size for Container
The chart can render to its container size. Set the size via inline styles or CSS as shown below.
<div id='container'>
<div id='element' style="width:650px; height:350px;"></div>
</div>Size for Chart
Set the chart size directly using the width and height properties.
In Pixel
You can set the size of chart in pixel as demonstrated below.
In Percentage
When percentage values are used, the chart dimensions are relative to the container. For example, a height of 50% renders the chart to half the container height.
Note: When you do not specify the size, it takes
450pxas the height and window size as its width.
Note: When no size is specified, the chart defaults to a height of450pxand uses the window width.