multiline headers and labels
Posted: Tue Oct 25, 2011 7:42 pm
I'm not having any luck creating multiline text in headers or labels in graphs
The tutorial say the following:
MultiLine labels
Axis labels can be displayed as multi-line text instead of a single line of text. Lines are separated using the TeeLineSeparator global constant, which by default is the carriage-return ascii character ( #13 ).
I searched the source code there is no 'TeeLineSeparator' defined that I can find. I tried inserting ascii (13) chars into a label string, and it performs a carriage return so all parts end up on 1 line on top of each other unreadable. I then tried adding an ascii (10) line feed in after the carriage return and that causes an error in the source.
The multiline example from the tutorial is a similar experience.
from the tutoria...
You may add several lines to the Header:
e.g.
$tChart1->getHeader()->setLines(new String[] {"Welcome to", "TeeChart", "for PHP"});
This line produces the following error.. "Parse error: syntax error, unexpected '[' ..." , I don't know what this line was trying to do.. I can't find evidence of a String class in the source code. I've tried cleaning this up a few ways and had no luck.
I've tried just making a simple array of strings..
$aa= array('line 1',line 2','line 3');
and passing that .. $tChart1->getHeader()->setLines($aa);
that produces a warning but the header is not set
Warning: imagettftext() expects parameter 8 to be string, array given in ...tcsource/GraphicsGD.php on line 2044
How do you create multiline header/footer/ titles and how do you create multiline labels ??
The tutorial say the following:
MultiLine labels
Axis labels can be displayed as multi-line text instead of a single line of text. Lines are separated using the TeeLineSeparator global constant, which by default is the carriage-return ascii character ( #13 ).
I searched the source code there is no 'TeeLineSeparator' defined that I can find. I tried inserting ascii (13) chars into a label string, and it performs a carriage return so all parts end up on 1 line on top of each other unreadable. I then tried adding an ascii (10) line feed in after the carriage return and that causes an error in the source.
The multiline example from the tutorial is a similar experience.
from the tutoria...
You may add several lines to the Header:
e.g.
$tChart1->getHeader()->setLines(new String[] {"Welcome to", "TeeChart", "for PHP"});
This line produces the following error.. "Parse error: syntax error, unexpected '[' ..." , I don't know what this line was trying to do.. I can't find evidence of a String class in the source code. I've tried cleaning this up a few ways and had no luck.
I've tried just making a simple array of strings..
$aa= array('line 1',line 2','line 3');
and passing that .. $tChart1->getHeader()->setLines($aa);
that produces a warning but the header is not set
Warning: imagettftext() expects parameter 8 to be string, array given in ...tcsource/GraphicsGD.php on line 2044
How do you create multiline header/footer/ titles and how do you create multiline labels ??