Legend with only one Line displays no title

TeeChart for PHP
Post Reply
Bernd Krause
Newbie
Newbie
Posts: 1
Joined: Wed May 22, 2013 12:00 am

Legend with only one Line displays no title

Post by Bernd Krause » Mon Jun 24, 2013 1:14 pm

I have a fastline chart with 1 - n lines. For every line I set a title ($$line->setTitle($print_title);) It works correct, if there are multiple lines in the chart. It displays the title of every line in the legend. But if there is only one line, the legend automatically displays the values instad of the title. How can I fix it?

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Legend with only one Line displays no title

Post by Yeray » Wed Jun 26, 2013 9:32 am

Hi,

This is the behaviour of the legend with Auto LegendStyle, the default one. You can change it to Series as follows:

Code: Select all

$tChart1->getLegend()->setLegendStyle(LegendStyle::$SERIES);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply