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".
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 chart image from a chart object.
Method | Definition |
---|---|
SetSeriesValuesFromArray SetSeriesValuesFromString |
Use these methods to fill a series with data values. |
SetSeriesXValuesFromArray SetSeriesYValuesFromArray SetSeriesXValuesFromString SetSeriesYValuesFromString |
Use these methods to fill a series with XY values. |
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 SetDataFromTxtFile |
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 this method to specify the format of the generated chart (Flash movie, JPG or PNG image, SVG or PDF document). |
ExportAsResponse ExportAsFile ExportAsBinary GetHTMLTag GetOutputLocation |
Use these methods to generate the chart in Flash format (.swf), in PNG or JPG image format (.png, .jpg), in SVG or PDF document format (.svg, .pdf). |
The first of the following examples creates an object named MyChart by using the ProgID parameter.
<OBJECT RUNAT=Server ID=MyChart PROGID="SwiffChartObject.ChartObj">
The second example, however, uses the Server.CreateObject method.
Dim chart Set chart= Server.CreateObject("SwiffChartObject.ChartObj")