The Chart object represents a single chart.
You can use either the CreateObject method or the New keyword to create a new Chart object.
The object ID for a chart on an ASP page returns a Chart object.
The programmatic identifier ProgID for the Chart object is "SwiffChartObject.ChartObj.1".
When a Chart object is first created, it is empty (it does not contain any series, categories, etc.). Use the methods described in the table below for filling a chart object with data, setting the graphical layout of a chart object and generating a Flash movie from a chart object.
Method | Definition |
---|---|
AddSeries | Use this method to add a new empty series to a chart object. This is required before setting the series data values and caption. |
SetSeriesValuesFromArray SetSeriesValuesFromString |
Use these methods to fill an existing series with data values. Use the AddSeries method to create a new empty series. |
SetSeriesXValuesFromArray SetSeriesYValuesFromArray SetSeriesXValuesFromString SetSeriesYValuesFromString |
Use these methods to fill an existing series with XY values. Use the AddSeries method to create a new empty series. |
SetSeriesCaption
SetSeriesCaptionsFromArray SetSeriesCaptionsFromString |
Use these methods to specify the series captions. |
SetCategoriesFromArray SetCategoriesFromString |
Use these methods to set the categories of a chart object. |
SetDataFromQuery SetDataFromFile |
Use these methods to set the series, categories, title, etc. all together. |
LoadStyle | Use this method to set the graphical layout of a chart object. This method takes a Swiff Chart style file as parameter (.scs). |
SetOutputFormat | Use these methods to specify the format of the generated chart (Flash movie, JPG image or PNG image). |
ExportAsResponse ExportAsFile ExportAsBinary GetHTMLTag GetOutputLocation |
Use these methods to generate the chart in Flash format (.swf), in PNG or JPG image format (.png, .jpg). |
The first of the following examples creates an object named MyChart by using the ProgID parameter.
<OBJECT RUNAT=Server ID=MyChart PROGID="SwiffChartObject.ChartObj.1">
The second example, however, uses the Server.CreateObject method.
var chart= Server.CreateObject("SwiffChartObject.ChartObj.1");