ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Interpreting the syntax
Posted by Gelfling on May-02-2012 07:58
Help shows me this addBarLayer3(data [, colors [, names [, depth ]]])

This is perl.

How would this look as in an example?

I don't understand the nested anonymous array part. Can someone explain?

  Re: Interpreting the syntax
Posted by Peter Kwan on May-03-2012 01:32
Hi Gelfling,

Sorry about the confusion. The "Usage" in the ChartDirector documentation is expressed in BNF syntax style. The [ .... ] means the enclosed part is optional. For the addBarLayer3, it means the parameters colors, names and depth are optional. However, if you omit the colors parameter, you must also omit the names and depth parameters. In other words, the addBarLayer3 can be used like:

$c->addBarLayer3($data);
$c->addBarLayer3($data, $colors);
$c->addBarLayer3($data, $colors, $names);
$c->addBarLayer3($data, $colors, $names, $depth);

Hope this can help.

Regards
Peter Kwan