Hallo,
I use the chart add-on and use two ContainerDataSeries (series1 ,series2).
Series2 should be behind series1 (see Attatchment chart.png) and not above.
How can I solve this problem!
How may I start at position 32 with series2?
My code:
ContainerDataSeries seriesO =
new ContainerDataSeries(prod.beanO());
ContainerDataSeries seriesU =
new ContainerDataSeries(prod.beanU());
// Set up the name and Y properties
seriesO.setName("Oslo");
seriesO.setNamePropertyId("id");
seriesO.setYPropertyId("type");
seriesU.setName("Berlin");
seriesU.setNamePropertyId("id");
seriesU.setYPropertyId("type");
// Set the category labels on the axis correspondingly
XAxis xaxis = new XAxis();
XAxis xaxis2 = new XAxis();
Labels xlabels = xaxis.getLabels();
xlabels.setAlign(HorizontalAlign.RIGHT);
xaxis.setTitle("Location");
SolidColor curBandColor = SolidColor.LIGHTBLUE;
PlotBand plotBand = new PlotBand(32,32.1, curBandColor);
plotBand.setLabel(new PlotBandLabel("Top 100"));
xaxis.setPlotBands(plotBand);
conf.addxAxis(xaxis);
YAxis y = new YAxis();
y.setMin(0);
y.setTitle("Fälle");
conf.addyAxis(y);
Legend legend = new Legend();
legend.setLayout(LayoutDirection.HORIZONTAL);
legend.setBackgroundColor("#FFFFFF");
legend.setHorizontalAlign(HorizontalAlign.LEFT);
legend.setVerticalAlign(VerticalAlign.BOTTOM);
legend.setX(100);
legend.setY(20);
legend.setFloating(true);
legend.setShadow(true);
conf.setLegend(legend);
Tooltip tooltip = new Tooltip();
tooltip.setFormatter("this.x +': '+ this.y +' Fälle'");
conf.setTooltip(tooltip);
PlotOptionsColumn plotoberhalb = new PlotOptionsColumn();
plotoberhalb.setPointPadding(0.2);
plotoberhalb.setBorderWidth(0);
conf.addSeries(seriesO);
conf.addSeries(seriesU);
chart.drawChart(conf);