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

Message ListMessage List     Post MessagePost Message

  Line width of second line
Posted by Leo on Apr-25-2013 11:16
Peter, I was unable to set the line width to 10 for the second line.
~~~
$c->addLineLayer($data0, 0xc00000)->setLineWidth(10);
$layer = $c->addLineLayer($data1, 0x00c000)->setUseYAxis2();
$layer->setLineWidth(10);
~~~
got the error:
Can't locate object method "setLineWidth" via package "LineLayer.setUseYAxis2" (perhaps
you forgot to load "LineLayer.setUseYAxis2"?) at foo3.pl line 47.

Thanks.

  Re: Line width of second line
Posted by Peter Kwan on Apr-26-2013 00:07
Hi Leo,

As according to ChartDirector documentation, the LineLayer object is returned from addLineLayer. It is not returned from setUseYAxis2. As according to ChartDirector documentation, the setUseYAxis2 does not return anything.

So the code should be:

#LineLayer object is returned by addLineLayer
$layer = $c->addLineLayer($data1, 0x00c000);

#setUseYAxis2 is a method of the LineLayer
$layer->setUseYAxis2();

#setLineWidth is a method of the LineLayer
$layer->setLineWidth(10);

Hope this can help.

Regards
Peter Kwan