Hi all,
We have two questions..
1. Can I add more legend in a XYLineChart ?
2. There are a way to add title in a Legend ?
Something like :
many thanks
Luca
How to add title in a Legend
For the legend I try to use the BlockContainer this is the code :
This is what I get :
My idea is have 2 BlockContainer one for "Real" and one for "Virtual" (see img. post # 1) and in evry BlockContainer other 2 BlockContainer one for the label an one for a part of legend...
My problem is than I can't get intems from blockcontainerLegend...
any suggest?
thanks
Luca
Code: Select all
LabelBlock labelblock = new LabelBlock("LEGEND", chartfont);
labelblock.setPadding(5D, 5D, 5D, 5D);
BlockContainer blockcontainer = new BlockContainer();
blockcontainer.add(labelblock, RectangleEdge.TOP);
BlockContainer blockcontainerReal = new BlockContainer();
LabelBlock labelblockReal = new LabelBlock("Real", chartfont);
blockcontainerReal.add( labelblockReal, RectangleEdge.TOP);
BlockContainer blockcontainerLegend = legend.getItemContainer();
blockcontainerReal.add(blockcontainerLegend);
blockcontainer.add(blockcontainerReal);
legend.setWrapper(blockcontainer);
My idea is have 2 BlockContainer one for "Real" and one for "Virtual" (see img. post # 1) and in evry BlockContainer other 2 BlockContainer one for the label an one for a part of legend...
My problem is than I can't get intems from blockcontainerLegend...
any suggest?
thanks
Luca