Use same colour for series in multi-bar chart [message #1257579] |
Wed, 26 February 2014 10:37  |
Eclipse User |
|
|
|
Hi,
I'm using the BIRT chart API in Eclipse. I've created a multi-bar chart using two series (i.e. {1, 2, 3, 4} and {4, 5, 6, 3} as the y-values for some x-values). The chart is attached as image1 and shown here.

As you can see, the bars for each x-value have the same colour! What I want is for the bars for each series to have the same colour. In other words, the first bar for each x-value would be blue and the second bar for each x-value would be red. See attached "correctimage".

I have tried everything to get this to work but have not had any luck. Specifically:
- I can get all the bars to be the exact same colour by setting the entries in seriesPalette for the x-axis series definition to be the same (attached as image2):
sdX.getSeriesPalette().getEntries().clear();
sdX.getSeriesPalette().getEntries().add(ColorDefinitionImpl.create(100, 0, 0, 210));
sdX.getSeriesPalette().getEntries().add(ColorDefinitionImpl.create(100, 0, 0, 210));

- I have tried to use multiple x-axes, multiple y-axes, but no luck.
- I have to tried to call "sdY.getSeriesPalette().update(f)" as I've seen in some places, but no luck.
How does one do this?!
Thanks for your help.
Attachment: image1.png
(Size: 18.47KB, Downloaded 1888 times)
Attachment: image2.png
(Size: 20.43KB, Downloaded 1672 times)
Attachment: correctimage.png
(Size: 88.26KB, Downloaded 1730 times)
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.28044 seconds