Page 1 of 1

Legend with only one Line displays no title

Posted: Mon Jun 24, 2013 1:14 pm
by 15966000
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?

Re: Legend with only one Line displays no title

Posted: Wed Jun 26, 2013 9:32 am
by yeray
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);