Overview (Dundas Pie Chart Server 1.0)

Dundas

Dundas Pie Chart Server Control 2.0

Copyright © Dundas Software Ltd. 2000. All Rights Reserved

Overview | Properties | Methods


The Dundas Pie Chart Server Control 2.0 allows you to quickly and painlessly add dynamic pie charts to your ASP applications.

  Features:

  • Add or remove pie chart slices (elements).

  • Change the title of the pie chart.

  • Rotate the chart progammatically.

  • Implement selection and drilldown with ease.

  • Change the pie slice labels as well as the labels for the pie slices in the Legend.

  • Change the sizes of the pie slices.

  • Change the minimum "collected" value (see below for more details).

  • Change the textures and/or colors of pie elements.

  • Explode/collapse pie elements.

 
To use this control in web pages you MUST USE either an <IMG> tag (see the source code for the two supplied ASP pages) or an <A> tag. In this demo there is one ASP page (let's call it the secondary page) which creates an instance of the ASP Pie Chart control, loads a template (created with the Template Creator), adds the specified data and then calls SendJPEG to send the data to the client. The first page (lets call it the main page) sets up the user interface, retrieves pie chart variables (like the number of slices, whether the slices are exploded, etc.) and then retrieves the pie chart image by embedding the secondary ASP page in an <IMG> tag with the SRC attribute set to the secondary page. The first page can be either an html or ASP file.

Small data elements (pie slices) are "collected" and then displayed together as one pie slice called the "collected" element. You can change the minimum data value at which slices are collected with the SetCollectedLimit method. Call SetCollectedProp to manipulate the properties of the collected slice (texture, color, etc.).

To make sure that the browser never uses a cached copy of the jpeg set the Expires property of the Response object to either zero or a negative value. See a tutorial for an example of this.

To output a pie chart jpeg perform the following actions in their specified order:

  1. Create an instance of an ASPPieChart object by using CreateObject (e.g. CreateObject("Dundas.PieChartServer.2")).

  2. Set the directory properties of the control which specify working directories for different aspects of chart activity. These properties are DirTemplate and DirTexture, and deal with the directories used to store templates and textures, respectively.

  3. Load a template via the LoadTemplate method.

  4. Set the properties of the pie chart (e.g. exploded pieces, collected element properties, etc.)

  5. Add pie chart data with the AddData method.

  6. Send the resulting jpeg directly to a client with the SendJPEG method or alternatively you can save the jpeg to disk with CreateJPEGFile and then present the image to a user with a standard <IMG> tag.

  7. If you want to generate another Jpeg using the same template then repeat Steps 4 to 6. If you want to create another jpeg with a different template repeat steps 1 to 6.

  8. Destroy the Pie Chart object by setting it to Nothing (e.g. Set objPieChart = Nothing).

  9. MAKE SURE that there is no html code in this ASP page which outputs the jpeg.

The ProgID of the control is: Dundas.PieChartServer.2

IMPORTANT: to successfully output a pie chart jpeg the Intel compression library (ijl15.dll) must exist either in your system directory or at the same directory level as the server control (AspPieChart.dll).

To minimize the amount of whitespace in the jpeg make the pie chart image as large as possible in the Template Creator.

For information concerning debugging, as well as FAQs and troubleshooting go to our developer site.

See Also: Dundas Pie Chart Overview | Template Creator Overview