Hi
I am doing a Price Volume graph and would like to know how to do the following:
How to have the VOLUME bar data in the bottom graph be the same color as the PRICE line data in the top graph. This is so that I can have more than 1 series in the PRICE graph, and therefore the VOLUME data can relate to a specific series in the top graph.
Also, at the moment I have 2 legends being displayed - 1 for price and 1 for volume, even though they would be the same companies' data. The legends have different colors (which I haven't sorted out yet - see question above), but the same wording. How can I have only 1 legend displayed for a price volume graph where there is only 1 series?
I would be very grateful for any response!
Thanks in advance.
Price Volume Graphs
Re: Price Volume Graphs
Color problem: you should be able to use the setSeriesPaint(Paint[] paint) method of Plot to set both series to the same color.
Legend display problem: you can try to create a special Legend class and then set it into the JFreeChart object before displaying.
Legend display problem: you can try to create a special Legend class and then set it into the JFreeChart object before displaying.