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

Message ListMessage List     Post MessagePost Message

  question on legend
Posted by aldy on Jan-03-2012 16:13
Attachments:
Hi Peter, thanks for you great support. Got a question about legend. I have a boxwhisker
chart and would like to add dashlines but should only be contained within a single boxplot
and not accross the chart. To  achieve this, I added another boxwhisker layers and added
datasets with dashline property. Chart looks fine but got a problem with the legend since
instead of dashlines, it shows boxes(for the limits and sigma), so it looks inappropriate for a
legend. Pls refer to attached image. Any idea on how to make them dashlines. Thanks in
advance.
boxplot.png
boxplot.png

31.92 Kb

  Re: question on legend
Posted by Peter Kwan on Jan-04-2012 01:59
Hi aldy,

For your case, you may disable the automatic legend entries of your additional dash line box-whisker layers. Then you may add empty line layers with the dash line style. In this way, the legend box will contain entries for the empty line layers, which are dash line icons.

The code should be like:

$myDashLineBoxWhiskerLayer->setLegendOrder(NoLegend);

$c->addLineLayer(null, $myDashLineColor0, $myName0);
$c->addLineLayer(null, $myDashLineColor1, $myName1);

Hope this can help.

Regards
Peter Kwan

  Re: question on legend
Posted by aldy on Jan-05-2012 10:27
Hi Peter, for some reason, if value is null, it will not be added to legend so I replaced it
with NoValue instead and it looks ok. Thanks for the idea.