This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I have the following code that generates an overlaid chart with three data series. Two bars and one line. I nees the two bars to be displayed side by side instead of on top of each other.
Nicholas Jordan
Ranch Hand
Joined: Sep 17, 2006
Posts: 1282
posted
0
That is a lot of code and docs to dig through on an api I have never seen but I do not see any vars in Plot that can be used to set each bar at some X-Position on a chart. There is plenty for Y-Scaling and putting a graphical up. Did you write this code? Looks like it came from an IDE ( a remarkable one )
ron cook
Greenhorn
Joined: Apr 09, 2009
Posts: 3
posted
0
Use ClusteredXYBarRenderer instead of XYBarRenderer:
ClusteredXYBarRenderer renderer1 = new ClusteredXYBarRenderer(0.20, false);
Also, combine series1 and series3 into one dataset like this:
TimeSeriesCollection tsc = new TimeSeriesCollection();
tsc.addSeries(series1);
tsc.addSeries(series3);
tsc.setXPosition(TimePeriodAnchor.MIDDLE);
return tsc;