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

Message ListMessage List     Post MessagePost Message

  setXData for depth area chart.
Posted by mephy on Apr-05-2015 21:56
Hello!

I'm using Depth Area chart (http://www.advsofteng.com/doc/cdphp.htm#deptharea.htm)
and I need a custom time values (i.e. 08:00:01, 08:29:37, 08:34:12 etc..)

In line chart I'd used $layer->setXDatamethod, but I cant find how to do this in depth area
chart.

Is this possible?

Thank you.

  Re: setXData for depth area chart.
Posted by Peter Kwan on Apr-07-2015 06:43
Hi mephy,

To use date/time values as the x-coordinate, the method for the area chart is exactly the
same as that for the line layer. For example:

$layer = $c->addAreaLayer($data2, 0x808080ff, "Server #1", 3);
$layer->setXData($myXCoor);

$layer = $c->addAreaLayer($data0, 0x80ff0000, "Server #2", 3);
$layer->setXData($myXCoor);

$layer = $c->addAreaLayer($data1, 0x8000ff00, "Server #3", 3);
$layer->setXData($myXCoor);

In the above, the $myXCoor can be an array of date/time in the chartTime representation
(seconds elapsed since Jan 1, 0001 00:00:00).

Hope this can help.

Regards
Peter Kwan