resize(width: Number, height: Number, noAnimation: Boolean);
width. Chart width.
height. Chart height.
noAnimation. Indicates whether animation is used on redrawing the chart. Available values:
true. Animation is used.
false. Animation is not used (default).
The resize method resizes the chart.
To execute the example, the HTML page must contain the Chart component named chart (see Example of Creating a Histogram). Change chart size:
// Check if the chart currently can be resized if(!chart.getIsResizing()){ // Resize the chart chart.resize(chart.getWidth()/2, chart.getHeight()/2, false); }
After executing the example a chart with width and height reduced by half is displayed in the screen:
See also: