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

Message ListMessage List     Post MessagePost Message

  fully customized legend
Posted by Massimo on Jul-22-2016 15:58
Attachments:
it is possible to have a legend box fully customised that does not take into account chart colours and labels?

In the chart below I need a legend like this:

1 squared box white background with text "median"
1 squared box with blue background with text "most readings"
1 squared box with grey background with text "less readings"

So how can I group the paired colours together in one single box?
AGP.png

  Re: fully customized legend
Posted by Massimo on Jul-22-2016 16:10
Attachments:
OK I got it,

easier than what I thought.. by simply setting the text to empty for one of the splineLayer parameter for the paired colours, this is hiding from the legend

// Add the data sets to the line layer.
Line50.addDataSet(DataPercentile50, 0xffffff, "median");
Line25.addDataSet(DataPercentile25, 0x0d89e8, "most readings");
Line10.addDataSet(DataPercentile10, 0x93979a, "less readings");
Line90.addDataSet(DataPercentile90, 0x93979a, "");
Line75.addDataSet(DataPercentile75, 0x0d89e8, "");

Now I need to figure it out if I can change the order of the legend items; any suggestion?
AGP.png

  Re: fully customized legend
Posted by Massimo on Jul-22-2016 16:44
Attachments:
found out also the order of the legend by playing with the order of these lines of code below.

Line50 = c.addSplineLayer(DataPercentile50, 0x164337, ""); //mdmw green for median
Line25 = c.addSplineLayer(DataPercentile25, 0xf3f709, ""); //yellow
Line75 = c.addSplineLayer(DataPercentile75, 0xf3f709, ""); //yellow
Line10 = c.addSplineLayer(DataPercentile10, 0xE3981F, ""); // mdmw orange
Line90 = c.addSplineLayer(DataPercentile90, 0xE3981F, ""); //lmdmw orange

I changed the colours due to requirements although I liked the previous colours.
AGP.png