Page 1 of 1

How to display marks with stacked100

Posted: Wed Jun 09, 2010 8:49 pm
by 7667590
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);
	}

Re: How to display marks with stacked100

Posted: Thu Jun 10, 2010 2:09 pm
by narcis
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!