NetCharts® Server: Example Interactive Chart for ColdFusion
This example inserts a drillable PNG image of a piechart into a
ColdFusion-generated page. See the source code.
Note: This is a static image - no interactivity.

Source Code:
<!---
InteractiveChart.cfm
Visual Mining, Inc.This example inserts a drillable PNG image of a piechart into the page The chart comes from a chart template named bannerads.cdx, which is located in a project called "ToolkitExamples" residing on a NetCharts Server running on localhost, port 8001.
The bannerads.cdx chart template contains two variables, THETITLE and CLICKDATA used to represent dynamic data in the chart. The chart displays pop-up labels over the pie slices. Each slice is also a drill target.
The HTML code resulting from exectuing this tag will contain a IMG tag for the chart image, a MAP tag for the image map, and some javascript to implement the mouse roll-over labels.
--->
<html>
<body><!---
Simulate getting real dynamic data for the chart. Each reload of the page will present different data.
--->
<cfset click1=#Rand()# * 100>
<cfset click2=#Rand()# * 100>
<cfset click3=#Rand()# * 100><cf_ncchart project="Examples/ToolkitExamples" server="localhost" port="8001" chart="bannerads.cdx">
<cf_ncvariable name="THETITLE" value="Banner Ad Click-Throughs\n#DateFormat(Now())#">
<cf_ncvariable name="CLICKDATA" value="#click1#,#click2#,#click3#">
</cf_ncchart>
</body>
</html>
![]()



