Hi Syam, Great job, awsome charts ;)
I have some code like below.
Question, how to superimpose one bar on second bar,
mean I would like to have value y1 behind value y2.
All is working when I have Data type in x variable, but when I am changing
variable x to CategoryData then I have chart from y1 on top of chart y2, but
I need y1 value behind y2.
Can You help me?
CategoryData x = new CategoryData("Banana","Mango","Apple","Juice","Orange");
Data y1 = new Data(5,9,6,7,8);
Data y2 = new Data(4,8,7,8,9);
SOChart soChart = new SOChart();
soChart.setSize("1200px", "500px");
BarChart barChart1 = new BarChart(x,y1); barChart1.setName("Capacity"); barChart1.setStackName("ONE");
BarChart barChart2 = new BarChart(x, y2); barChart2.setName("Used Capacity"); barChart2.setStackName("ONE");
barChart2.setColors(new Color("#25B15F"));
XAxis xAxis = new XAxis(DataType.CATEGORY);
YAxis yAxis = new YAxis(DataType.NUMBER);
RectangularCoordinate rectangularCoordinate = new RectangularCoordinate(xAxis,yAxis);
barChart1.plotOn(rectangularCoordinate); barChart2.plotOn(rectangularCoordinate);
soChart.add(rectangularCoordinate);