Mark Label is missing when there is a single bar
Posted: Tue Jul 24, 2012 4:07 pm
Hi,
I created a simple pareto chart, and I noticed that mark label is missing when there is a single bar. Is there a fix for this?
Here is run as it is to illustrate the issue above:
I created a simple pareto chart, and I noticed that mark label is missing when there is a single bar. Is there a fix for this?
Here is run as it is to illustrate the issue 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;
// simple one bar
Bar blueSeries = new Bar(chart.getChart());
blueSeries.setMultiBar(MultiBars.SIDE);
blueSeries.add(0, 10, "A", Color.blue);
labelsList = new StringList(1);
labelsList.add(0, "10");
blueSeries.setLabels(labelsList);
blueSeries.getMarks().setVisible(true);
blueSeries.setTitle("blue series");
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);
}