data grid control

Advanced Data Grid Control

[ Bar Graph Home ] [ Tutorials ] [ Getting Started ] [ Examples & Demos ] [ Solutions ]

Dynamic Methods

The Applet form of the Graph has several methods exposed which enable the properties and data of the graph to be updated dynamically from other page objects.

So that the Graph may be referenced from other page objects it must first be named. This is done by adding the 'name' parameter to the <applet> tag. i.e,

<applet name="GRAPH" code="VbarchartApplet.class" archive="Vbarchart.jar" width="500" height="420" mayscript>

The methods are,

Set a Data Value

Reload Data

Set a Parameter

 


Set a Data Value

set_datavalue(int datanum, int series, String value, boolean re_paint)

This method enables any of the graph data values to be changed.

datanum - this specifies the bar number within the series to be changed.

series - this specifies which series is to be changed.

value - the value to which this data item should be set.

re-paint - specifies whether the graph should be re-drawn once the data value is set. Value can be either "true" or "false"

e.g. to add a button to your web page which will update the second data value of series 1,

<input type="button" value="Update Data Item" onclick="document.applets['GRAPH'].set_datavalue(2,1,"52.4", true);">

^back to top


Reload Data

reload_data(String value, boolean re_paint)

This method enables all the graph data to be reloaded from a file or server side process. This method is particularly useful where you wish the chart data to be refreshed either by a user action or time interval.

value - the URL specifying the location of the data file or server side process supplying the data

re-paint - specifies whether the graph should be re-drawn once the data is loaded. Values may be either "true" or "false".

^back to top


Set a Parameter (graph property)

set_parameter(String parmname, String value, boolean re_paint)

This method enables any of the Graph Parameters to be modified dynamically during runtime.

parmname - this is the property name as defined in the Parameters section.

value - the value which this property should be set.

re-paint - specifies whether the graph should be re-drawn once the parameter is set. Value can be either "true" or "false"

e.g. to add a button to your web page which will turn the 3D effect off,

<input type="button" value="3D Off" onclick="document.applets['GRAPH'].set_param('3D', 'false', true);">

^back to top

 

« back to Documentation Index

« back to Getting Started

[ Bar Graph Home ] [ Tutorials ] [ Getting Started ] [ Examples & Demos ] [ Solutions ]

Getting Started

Documentation

Examples

Tutorials

Common Problems
This section describes and provides solutions to common problems.