Mark Label is missing when there is a single bar

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Jonathan
Newbie
Newbie
Posts: 60
Joined: Tue Mar 11, 2008 12:00 am
Location: Austin

Mark Label is missing when there is a single bar

Post by Jonathan » 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:

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

WhebJava
Newbie
Newbie
Posts: 10
Joined: Mon Feb 15, 2010 12:00 am

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

Post by WhebJava » Wed Jul 25, 2012 3:45 pm

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

Yeray
Site Admin
Site Admin
Posts: 9617
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Fri Jul 27, 2012 8:34 am

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 24405 times
WhebJava code creates a Bar series and adds a point with "a" label:
Bar1.png
Bar1.png (26.35 KiB) Viewed 24397 times
Please, explain what result would you expect.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Jonathan
Newbie
Newbie
Posts: 60
Joined: Tue Mar 11, 2008 12:00 am
Location: Austin

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

Post by Jonathan » Fri Aug 03, 2012 4:38 pm

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".
Attachments
Missing bar label.png
Missing bar label.png (30.96 KiB) Viewed 24349 times

Yeray
Site Admin
Site Admin
Posts: 9617
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Mon Aug 06, 2012 11:24 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Jonathan
Newbie
Newbie
Posts: 60
Joined: Tue Mar 11, 2008 12:00 am
Location: Austin

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

Post by Jonathan » Mon Aug 06, 2012 3:07 pm

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)
Attachments
TeeChart_MissingLabels_Jonathan.zip
(3.2 KiB) Downloaded 1436 times

Yeray
Site Admin
Site Admin
Posts: 9617
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Wed Aug 08, 2012 12:01 pm

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

WhebJava
Newbie
Newbie
Posts: 10
Joined: Mon Feb 15, 2010 12:00 am

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

Post by WhebJava » Wed May 29, 2013 8:59 pm

Hello,

Do you have a date to release this fix?

Yeray
Site Admin
Site Admin
Posts: 9617
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Thu May 30, 2013 2:44 pm

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
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply