Code: Select all
org.jfree.chart.title.LegendTitle aLegend =
new org.jfree.chart.title.LegendTitle(ReturnsPlot);
This is for a combo lot, which is created as follows.
Code: Select all
org.jfree.chart.plot.CombinedDomainXYPlot cplot = new org.jfree.chart.plot.CombinedDomainXYPlot(domainAxis);
cplot.add(PortfolioValuePlot);
cplot.add(ReturnsPlot);
Initially, the first of the plots had only one item, and a different perspective of it was provided in the second plot, along with several other series.
Now I need to add a second series to the first plot which does not get represented in the second plot. In fact, it is already added to the chart, but it looks odd because it is not represented in the legend (which ought to represent both charts). How do I manually add an item to the legend to represent this second series in the first plot?
Thanks
Ted