ComponentOne WebChart 8.0 for ActiveX
Runtime Only ASP Pages

While the ComponentOne WebChart Design Time Controls can be convenient and easy to use, you may find that after gaining experience programming ASP pages, you simply do not need the InterDev environment to obtain the desired result. In fact, sometimes having a template file is far easier than starting each page from scratch in InterDev.

This section will discuss /WebChart8/details/Minimum.asp, and how it may be modified to produce a simpler, easier to read source for an ASP page used only in the ASP runtime environment. The modified page follows, and is available in /WebChart8/details/Runtime.asp.

Example Title
Copy Code
<!-- #INCLUDE VIRTUAL="/WebChart8/Include/VBS/color.inc" -->
<!-- #INCLUDE VIRTUAL="/WebChart8/Include/VBS/2dconst.inc" -->
<!-- #INCLUDE VIRTUAL="/WebChart8/Include/VBS/2dgentag.inc" -->

<html>
<body>

<p>Text above the chart</p>

<br>
<%
  Dim Chart2DASPDesigner1
  Set Chart2DASPDesigner1 = Server.CreateObject("C1Chart2D8.ASPComponent")

  Sub Chart2DASPDesigner1_Load()
    With Chart2DASPDesigner1
      .Width = 254
      .Height = 205
      .IsBatched = True

      .Interior.BackgroundColor = 11888021
      .ChartGroups(1).ChartType = oc2dTypeBar

      .IsBatched = False
    End With
  End Sub

  Call Chart2DASPDesigner1_Load()

  Call OlectraChart2D_GenerateTag(Chart2DASPDesigner1, "Chart2DASPDesigner1")
%>

<br>

<p>Text below the chart</p>

</body>
</html>

This version of the ASP page produces exactly the same response as the first version, but has eliminated all the unnecessary METADATA and script generated by the DTC. The METADATA is eliminated because it is not necessary at runtime. All of the script relating to the chart objects’ fonts has been eliminated, since all the font specifications were default values. Thus, the Chart2DASPDesigner1_Load() function has been reduced to setting the Height, Width, the Interior.BackgroundColor and the ChartGroups(1).ChartType.

 

 


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

Product Support Forum  |  Documentation Feedback