Specifies the width in pixels of the chart.

void object.SetWidth( int width )

Arguments

object
Required. A Chart object.
width
Required. An integer value that specifies the width in pixels of the chart.

Remarks

The SetWidth method specifies the width in pixels of the movie or image generated from a chart object.

Loading a chart style with the LoadStyle method sets the width to the value stored in the style file.

JSP Sample Code

The following JSP code illustrates use of the SetWidth method.

chart.SetDataFromTxtFile("C:\\myData.txt");
chart.LoadStyle("C:\\myStyle.scs");

// Retrieve movie Width and Height set by the call of LoadStyle method 
int w= chart.GetWidth();
int h= chart.GetHeight(); 

// Now scale the movie by 2 
chart.SetWidth(2 * w);
chart.SetHeight(2 * h);

chart.ExportAsResponse();

See Also

GetWidth Method | SetTitle Method | SetSubtitle Method | SetHeight Method | SetFrameRate Method

Applies To: Chart Object