ComponentOne WebChart 8.0 for ActiveX
Creating a Server-Side Component in an ASP Page

An instance of the charting component is created within an ASP page using the built-in ASP object instance creation method, Server.CreateObject. The single string parameter refers to the ProgID (registered name) of the WebChart server-side component(s), which must be installed on the system. The names to use for 2D and 3D appear in the sample code that follows.

VBScript:

Example Title
Copy Code
Set Chart2D = Server.CreateObject( "C1Chart2D8.ASPComponent" )
Set Chart3D = Server.CreateObject( "C1Chart3D8.ASPComponent" )

JScript:

Example Title
Copy Code
var Chart2D = Server.CreateObject( "C1Chart2D8.ASPComponent" );
var Chart3D = Server.CreateObject( "C1Chart3D8.ASPComponent" );

It is critical to use the built-in ASP Server.CreateObject method, not the native CreateObject (VBScript) or new (JScript) methods in order that the components interact properly with the ASP.

An alternative is use the HTML <OBJECT> tag to create an instance of the appropriate chart component, supplying the RUNAT attribute with a value of Server, and the ID attribute set to the variable name you will use in your scripts. You can identify the object by using either its ProgID (registered name) or its CLSID.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback