Source: site.view [edit]
Function name: chartDemo
Arguments: n
Description: chartDemo returns several different examples of Chart Data, keyed by n=1,2,..5. For use with the chart() command.
Page type: webl
Render function:  
Module: global

Page source:

n = (ToInt(n) ? 1);
var data = "Please enter a number 1 through 5.";

if (n == 1) then
   data = [. title="Demo Data",
      type="PIE3DEXPL", legend = "right",
      series=[100, 2, 30, 50, 90], 
      categories=["adam", "john", "bill", "jim", "fred"] .]
elsif (n == 2) then
   data = [. title="Demo Data",
      type="BAR3D", legend = "right",
      series=[100, 2, 30, 50, 90], 
      categories=["adam", "john", "bill", "jim", "fred"] .]
elsif (n == 3) then
   data = [. title="Demo Data",
      type="column3d", legend = "right",
      series=[100, 2, 30, 50, 90], 
      categories=["adam", "john", "bill", "jim", "fred"] .]
elsif (n == 4) then
   data = [. title="Demo Data",
      type="LINESMTH", legend = "right",
      series=[100, 2, 30, 50, 90], 
      categories=["adam", "john", "bill", "jim", "fred"] .]
elsif (n == 5) then
   data = [. title="Demo Data",
      type="CONE", legend = "right",
      series=[100, 2, 30, 50, 90], 
      categories=["adam", "john", "bill", "jim", "fred"] .]
end;

data;