chartConfig.getTitle().setText(
"Population pyramid for Germany, midyear 2010");
chartConfig.getSubtitle().setText("Source: www.census.gov");
CategoryAxis xAxisMain = new CategoryAxis();
List<String> categories = Arrays.asList("0-4", "5-9", "10-14", "15-19",
"20-24", "25-29", "30-34", "35-39", "40-44", "45-49", "50-54",
"55-59", "60-64", "65-69", "70-74", "75-79", "80-84", "85-89",
"90-94", "95-99", "100 +");
xAxisMain.setCategories(categories);
xAxisMain.setReversed(false);
LinkedHashSet<XAxis> xAxesSet = new LinkedHashSet<InvientChartsConfig.XAxis>();
// Opposite axis
xAxesSet.add(xAxisMain);
CategoryAxis xAxis = new CategoryAxis();
xAxis.setCategories(categories);
xAxis.setOpposite(true);
xAxis.setReversed(false);
xAxis.setLinkedTo(xAxisMain);
xAxesSet.add(xAxis);
chartConfig.setXAxes(xAxesSet);
NumberYAxis yAxis = new NumberYAxis();
yAxis.setTitle(new AxisTitle(""));