Super 2d/3d Graph Library

Enhance your .NET application adding nice charts within minutes! Save time and money!


Example 23: Client-Side Control

Super 2d/3d Graph Library control can also be used as a client-side control hosted by Internet Explorer 6.0 or later.

Note that this is a third way to use the library and is only available to Internet Explorer (the other two methods are explained in the rest of tutorials - as a Windows Form user control and as a ASP.NET server library).

Using the library as a client-side user control provides greater interactivity because it is running on client machine: context menu, tooltips and animations are possible on the web, and also you can change any property of the chart as well as assign new data using javascript.

This page is a sample of this usage of the control. Feel free to browse the HTML source of this page.

In the <head> section of this HTML document, you'll see a simple initialization script for the <object> with id "chartControl":

<script language="vbscript">
sub Test
document.getElementById("chartControl").SampleChart()
document.getElementById("chartControl").SettingsFromString =
 "H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAE....."
document.getElementById("chartControl").Animate()
end sub
</script>


SampleChart() is an utility method of the library useful to assign random data and colors to the chart.

SettingsFromString allows you to assign all look and feel settings in one sentence. The settings are packed in a base 64 encoded string generated by the Chart Wizard tool included in the download package.

"chartControl" refers to the <object> tag inserted later in the document with the script:

<script src="Super2d3dGraphControl.js"></script>

The content of this script is:

var h = '<object id="chartControl" classid="http://www.softwaresigloxxi .com/bin/ Super2d3dGraphLibrary.dll#Super2d3dGraphLibrary.Super2d3dGraph"
width="500" height="400"></object>'
document.write(h)


This trick is necessary to avoid the "click to activate control" message that was introduced after an update of Internet Explorer in the past.

This sample uses random data generated by SampleChart() method. To specify correct data use SeriesFromString method. Sample:


document.getElementById("chartControl").SeriesFromString =
"150.2,78.1;-93.1,104.4"


(Use colon (;) to separate series, and comma (,) to separate values in each serie).

 





 

License & Purchase Info


Current version: 14

Super 2d/3d Graph Library is available as:
-Standard License (99€)
-Premium License (149€)
-Enterprise License (299€)

Click here for more details & purchase

Contact Info


Feel free to contact us
for questions related to any of our products or custom .Net development. We usually respond in the same labor day.

Software Siglo XXI

Main support service: support@softwaresigloxxi.com

Sales and other enquiries: contact@softwaresigloxxi.com