How to display marks with stacked100

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

How to display marks with stacked100

Post by Jonathan » Wed Jun 09, 2010 8:49 pm

Hi,

I have multiple bar series with stacked100 bar type. Is it possible to display marks on the top of each bar series? (like http://www.telerik.com/help/winforms/un ... ar100.html) If yes, how can I do that?

If that is impossible with current TeeChart, how can I display all the marks above each bar series in 2D? (I know 3D can display marks above each bar series) In an application I am working on, we use a 2D. I attached my sample code about multiple bar series.

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

		//stacked 100% bar chart
		Bar b1 = new Bar(chart.getChart());
		b1.add(1.0, 10);
		b1.add(2.0, 30);
		b1.add(3.0, 0);
		b1.setMultiBar(MultiBars.STACKED100);
		
		Bar b2 = new Bar(chart.getChart());
		b2.add(1.0, 10);
		b2.add(2.0, 0);
		b2.add(3.0, 30);
		b2.setMultiBar(MultiBars.STACKED100);		
		
		//set 2D
		chart.getAspect().setView3D(false);
		
		frame.add(panel);
		frame.setSize(600, 600);
		frame.setVisible(true);
	}

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: How to display marks with stacked100

Post by Narcís » Thu Jun 10, 2010 2:09 pm

Hi Jonathan,

You can do this setting custom marks positions as shown on this thread. This is a TeeChart for .NET thread but the same applies to the Java version.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply