Bars are missing on single X category with Side option

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

Bars are missing on single X category with Side option

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

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

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

Re: Bars are missing on single X category with Side option

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

Hi Jonathan,

This is what I'm getting with your code:
Bars.png
Bars.png (25.47 KiB) Viewed 16188 times
I don't see what's wrong. I understand this is the result I'd expect with your code: Two side bars with one point each one. Their labels are "A" and "B" when you add the points, then you change them to "10" and "20". And you finally use custom labels in the bottom axis to just show a "A" at the 0.
Could you please explain again 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: Bars are missing on single X category with Side option

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

Hi Yeray,

Your chart is exactly what I expect to see. However, for some reasons, I am not getting that chart, but the following instead: (With Teechart V2 version and TeeChartJavaSuite_2012Eval.zip, I am seeing the same result - missing bars [missing red series in the sample codes]) I attached mine: Could you tell me what is missing/wrong?
Attachments
Missing bars.png
Missing bars.png (5.36 KiB) Viewed 16127 times

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

Re: Bars are missing on single X category with Side option

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

Hi Jonathan,

Please, attach the whole testing application (clean, export and zip it, if you are in eclipse) so we see if there's something we've missed.
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: Bars are missing on single X category with Side option

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

Hi Yeray,

Since the max. allowed size is 512 KB, I had to remove the lib file. I attached the whole testing application (using Eclipse) in zip. What version of teechart lib were you using? Was it same one as mine (version2) ?
Attachments
TeeChart_MissingBrs_Jonathan.zip
(3.27 KiB) Downloaded 1108 times

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

Re: Bars are missing on single X category with Side option

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

Post Reply