Stacked Bar Chart Example

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
froggyware
Newbie
Newbie
Posts: 21
Joined: Tue Nov 15, 2011 12:00 am

Stacked Bar Chart Example

Post by froggyware » Fri Sep 14, 2012 9:35 pm

Hi,

Does anyone have a snippet of code for the creation of a stacked bar chart?

thx.

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

Re: Stacked Bar Chart Example

Post by Yeray » Mon Sep 17, 2012 8:23 am

Hi,

Have you tried using the setMultiBar(MultiBars.STACKED) function?

Code: Select all

		Bar bar1 = new Bar(tChart1.getChart());
		bar1.fillSampleValues();
		bar1.setMultiBar(MultiBars.STACKED);
		
		Bar bar2 = new Bar(tChart1.getChart());
		bar2.fillSampleValues();
		bar2.setMultiBar(MultiBars.STACKED);
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