Page 1 of 1

Mark Label is missing when there is a single bar

Posted: Tue Jul 24, 2012 4:07 pm
by 7667590
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:

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);
	}		

Re: Mark Label is missing when there is a single bar

Posted: Wed Jul 25, 2012 3:45 pm
by 15355256
I have the same problem, but I am not using MultiBars.

public NewJFrame() {
try {
initComponents();
setSize(new Dimension(500, 500));

Bar b = new Bar();
b.getMarks().setVisible(true);
t.getChart().addSeries(b);
b.add(1, 1, "a");
jPanel1.add(t,BorderLayout.CENTER);
} catch (Exception ex) {
Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
}
}

Re: Mark Label is missing when there is a single bar

Posted: Fri Jul 27, 2012 8:34 am
by yeray
Hi,

I'd say I'm getting the expected result here in both cases.

Jonathan's code creates a bar series, adds a point with "A" label, changes the point label to "10" and uses custom labels on the bottom axis to show an "A" on the 0 value:
Bar2.png
Bar2.png (24.11 KiB) Viewed 24191 times
WhebJava code creates a Bar series and adds a point with "a" label:
Bar1.png
Bar1.png (26.35 KiB) Viewed 24183 times
Please, explain what result would you expect.

Re: Mark Label is missing when there is a single bar

Posted: Fri Aug 03, 2012 4:38 pm
by 7667590
Hi Yeray,

I don't see that expected chart in my end. I attached a chart when I ran the sample codes above. As you can see, I don't see the bar label "10".

Re: Mark Label is missing when there is a single bar

Posted: Mon Aug 06, 2012 11:24 am
by yeray
Hi Jonathan,

Please, attach the complete application so we can import in Eclipse/NetBeans. Or please tell us step-by-step instructions on how to run it in any other environment.
Thanks in advance.

Re: Mark Label is missing when there is a single bar

Posted: Mon Aug 06, 2012 3:07 pm
by 7667590
Hi Yeray,

Since the max. allowed size is 512 KB, I had to remove the lib file and I attached the exported eclipse zip file. BTW, What version of Teechart lib are you using? I am using Teechart version 2. (I also tried with TeeChartJavaSuite_2012Eval.zip)

Re: Mark Label is missing when there is a single bar

Posted: Wed Aug 08, 2012 12:01 pm
by yeray
Hi Jonathan,

Thanks to your application I could reproduce it. It seems it only happens in the swing version.
I've added it to the defect list to be revised asap.

Re: Mark Label is missing when there is a single bar

Posted: Wed May 29, 2013 8:59 pm
by 15355256
Hello,

Do you have a date to release this fix?

Re: Mark Label is missing when there is a single bar

Posted: Thu May 30, 2013 2:44 pm
by yeray
Hi,

I'm afraid this hasn't been fixed yet (TJ71016294).
I'd suggest you to follow the following channels for new release announcements: this forum, RSS news feed, Twitter and Facebook
And check what's implemented on each new release looking at the public release notes:
https://www.steema.com/versioninfo/java