I want to display custom marks of count and percent at the same time on each bars. When I use setLabels API, the custom label also replaces x label (in my example, A and B) as well. Is there a way not to replace the x label but display the custom labels/mark on bar series ? (In my example below, x label should be "A" and "B", and the custom mark should be "40, 40%" and "60, 60%", respectively)
Code: Select all
public static void main(String[] args) {
JFrame frame = new JFrame();
JPanel panel = new JPanel();
panel.setSize(600, 600);
final TChart chart = new TChart();
final int INCREMENT = 10;
ChartPaintListener chartPaintListener;
panel.add(chart);
Bar b = new Bar(chart.getChart());
b.add(0,40,"A");
b.add(1,60,"B");
StringList label = new StringList(1);
label.add(0,"40, 40%");
label.add(1,"60, 60%");
b.setLabels(label);
chart.getAspect().setView3D(false);
frame.add(panel);
frame.setSize(600, 600);
frame.setVisible(true);
}