I'm attempting to get a chart director piechart to show percentages in the label. By default it's showing the numerical value.
After reviewing chart director documentation I thought this command would take care of it:
select 'dbr.chart.options', 'chartdirector', '$layer->setLabelFormat("{label} ({percent}%)");';
No pie chart displays and it shows this error: Fatal error: Call to a member function setLabelFormat() on a non-object in C:\inetpub\wwwroot\reporting\lib\chart2.php(70) : eval()'d code on line 1
I'm also trying to move the pie chart labels to the side (they overlap when displayed around the pie chart). After consulting the chartdirector documentation again, I figured this would work:
select 'dbr.chart.options', 'chartdirector','$piechart->setLabelLayout("SideLayout");';
But I get no chart and this error: Notice: Undefined variable: piechart in C:\inetpub\wwwroot\reporting\lib\chart2.php(70) : eval()'d code on line 1 Fatal error: Call to a member function setLabelLayout() on a non-object in C:\inetpub\wwwroot\reporting\lib\chart2.php(70) : eval()'d code on line 1
I figure I'm missing something on how the chartdirector commands translate to mydbr. In a previous example of "setAggregateLabelFormat" the notation in the chartdirector documentation is "layer.setAggregateLabelFormat" but in mydbr it's "layer->setAggregateLabelFormat". I figured then that the other commands would be the same, i.e. change the "." to a "->". Did I miss something in my logic or would this be a case of not having valid data to display?
Thanks,
-nth-