NetCharts® Server: ASP Toolkit getChartAsImageAndMap Example
This example shows how to utilize the NetCharts Server ASP Toolkit to add an interactive chart to an ASP page. The example uses the NetChartsServer.NSToolkit class to add a chart with popup labels onto the ASP page using VBScript. Multiple charts can be added to the page using the NetCharts Server ASP Toolkit. See the Source Code.
Note: This is a static image - no interactivity.

Source Code
<html>
<head>
<title>NetCharts Server ASP Toolkit Example - getChartAsImageAndMap</title>
</head><body>
<p>Create instances of the <i>NetChartsServer.NSToolKit</i> and <i>NetChartsServer.Hashtable</i> classes.</p>
<%
Dim toolKit, variables
Set toolKit = Server.CreateObject("NetChartsServer.NSToolKit")
Set variables = Server.CreateObject("NetChartsServer.Hashtable")
toolKit.setProject "Examples/Suppliers"
toolKit.setServerInfo "localhost", 8001
variables.putValue "type", "PNG"
%><p>Right here I have placed some JavaScript that will assist in the interactivity of the charts. If you look at the
source, you'll see it. To add such code, it only takes one function call: <i>toolKit.getRolloverJavaScript</i>.</p>
<%=toolKit.getRolloverJavaScript%><p>You can place any HTML you would like here. This includes table, text, images, etc.
Then when you want to add an chart to the page, like below this text,
just use the following code: <i>toolKit.getChartAsImageTag("CHART TEMPLATE", myHashTable)</i>
to add the chart to the page.</p>
<%=toolKit.getChartAsImageAndMap("basicbar.cdx", variables)%><p>Repeat the process for each chart you would like to add to the page.</p>
<%
Set variables = Nothing
Set toolKit = Nothing
%>
</body>
</html>
![]()



