Search Locate Previous Next Contents

ch.JScript – define JavaScript prologue

This includes the definition of any JavaScript functions or global variables in the chart, so that chart objects may define events for data items which can run your code in the web browser.

ch.JScript'// Globals' 'var total=0;'
ch.JScript addme

The script may be passed as a vector of strings, or a simple string delimited by carriage-return characters.

All scripts must be defined before you plot any data which may call them. This function may be called several times to set up global variables and a collection of functions if this is convenient.



Continue to: ch.JSet – set JavaScript properties
© Copyright Causeway Graphical Systems Ltd 2003