The server component can be used to enhance web pages, or to automate the creation of charts as data is updated. You can use the component from:
The basic steps for using the rChart server component in any context, are:
In order for the server component to produce a chart, it needs two things:
The chart definition comes from workspaces and/or styles. Data is also stored in the workspace, although the power of the server component comes from its ability to combine an existing definition with new data.
The simplest way to use the server component is to create a workspace containing a complete chart definition (including a data source description). That way, all the server has to do is load the workspace and refresh its data, as in the following example:
set obj=Server.CreateObject("FCCOM.ChartSrv")
obj.LoadWorkspace "my-chart-workspace.fcw"
obj.Refresh
obj.CreateSWFStream
obj.Clear
set obj = nothing
Under some circumstances, you may need to assemble your chart from an empty workspace and one or more styles, like this:
set obj=Server.CreateObject("FCCOM.ChartSrv")
obj.LoadWorkspace "my-empty-workspace.fcw"
obj.LoadStyle "my-style.fcs"
obj.Refresh
obj.CreateSWFStream
obj.Clear
set obj = nothing
This approach is usually not necessary, but may become necessary if you want to combine into one presentation more than one chart, each of which drawing on different data - see Samples\asp\example3.asp (in the rChart installation folder).
rChart defines four user values (User1 through User4) which are exposed through the rChart server component, as are two query substitution parameters (A and B). These can be used to parameterize chart captions (titles, etc.), and database queries.
Although rChart can draw its data directly from text files and ODBC databases, the server component also allows you to feed in data programmatically - see the contents of the Samples\asp folder of the rChart installation.
The server component can create output in one of two ways: to .swf files (in any context) or browser streaming (when used in asp only).
Some of the ways rChart server can be used include:
Copyright © 2002 by rObjects. All rights reserved.