Bars are missing on single X category with Side option
Posted: Tue Jul 24, 2012 4:01 pm
Hi,
I created a simple pareto chart, and I found a bug; I noticed that bars (after the first bar) are missing when I have multiple bars on the same X category with marks labels being displayed and with MultiBars.SIDE. Is there a fix for this?
here is run as it is to illustrate the problem above
I created a simple pareto chart, and I found a bug; I noticed that bars (after the first bar) are missing when I have multiple bars on the same X category with marks labels being displayed and with MultiBars.SIDE. Is there a fix for this?
here is run as it is to illustrate the problem above
Code: Select all
public static void main(String[] args) {
JFrame frame = new JFrame();
JPanel panel = new JPanel();
panel.setSize(600, 600);
TChart chart = new TChart();
panel.add(chart);
StringList labelsList;
Bar blueSeries = new Bar(chart.getChart());
blueSeries.setMultiBar(MultiBars.SIDE);
blueSeries.add(0, 10, "A");
labelsList = new StringList(1);
labelsList.add(0, "10");
blueSeries.setLabels(labelsList);
blueSeries.getMarks().setVisible(true);
blueSeries.setTitle("blue series");
Bar redSeries = new Bar(chart.getChart());
redSeries.setMultiBar(MultiBars.SIDE);
redSeries.add(0, 20, "A");
labelsList = new StringList(1);
labelsList.add(0, "20");
redSeries.setLabels(labelsList);
redSeries.getMarks().setVisible(true);
redSeries.setTitle("red series");
//custom x label
chart.getAxes().getBottom().getCustomLabels().clear();
chart.getAxes().getBottom().getCustomLabels().add(0.0, "A");
chart.getAspect().setView3D(false);
frame.add(panel);
frame.setSize(600, 600);
frame.setVisible(true);
}