How can I do this graph?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Jakob
Newbie
Newbie
Posts: 4
Joined: Fri Dec 05, 2003 5:00 am

How can I do this graph?

Post by Jakob » Thu Feb 19, 2004 8:11 am

Hi, I would like to implement the following graph. Note that
the bottom axis shall be logarithmic.

http://www.osiris.no/jakob/graph.jpg

Best regards
/Jakob

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Feb 19, 2004 9:04 am

Hi Jakob,

you should be able to do this using the following code :

Code: Select all

		private void Form1_Load(object sender, System.EventArgs e)
		{
			tChart1.Aspect.View3D = false;
			horizBar1.Marks.Visible = false;			
			horizBar2.Marks.Visible = false;
			horizBar1.Add (3,"DiagnoseX");
			horizBar1.Add (-2,"DiagnoseC");
			horizBar1.Origin = 1;
			horizBar2.Add (2,"DiagnoseX");
			horizBar2.Add (-3,"DiagnoseC");
			horizBar2.Origin = 1;
			//tChart1.Axes.Bottom.Logarithmic = true;
			horizBar2.MultiBar = Steema.TeeChart.Styles.MultiBars.Stacked;			
		}
But, it seems to be a bug setting an Origin and Stacked style. I've added it on our defect list and a fix for it will be considered to inclusion for the next maintenance releases.

Jakob
Newbie
Newbie
Posts: 4
Joined: Fri Dec 05, 2003 5:00 am

Post by Jakob » Thu Feb 19, 2004 10:23 am

Pep wrote: But, it seems to be a bug setting an Origin and Stacked style. I've added it on our defect list and a fix for it will be considered to inclusion for the next maintenance releases.
Yes, this is exactly what I had problem with! When is the next releas scheduled? Is there any other possibility to do this? I have a release coming up very soon.

Is there any way to have bars have several colors (like my example graph) without using stacked bars`?

Regards
/Jakob

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Feb 23, 2004 12:09 pm

Hi --
Is there any way to have bars have several colors (like my example graph) without using stacked bars`?
You can try something similar to this

Code: Select all

private void Form1_Load(object sender, System.EventArgs e) {
	tChart1.Aspect.View3D = false; 
	horizBar1.Marks.Visible = false;          
	horizBar2.Marks.Visible = false; 
	horizBar1.Add (3,1,"DiagnoseX", Color.Green);
	horizBar1.Add (2,1,"DiagnoseX", Color.Red); 
	horizBar1.Add (-3,2,"DiagnoseC", Color.Green); 
	horizBar1.Add (-2,2,"DiagnoseC", Color.Red); 
	horizBar1.Origin = 1; 
}
When is the next releas scheduled?
Build 1.1.1499.42325 was released on 9/Feb/2004, meaning that the next maintenance release should be available in May/June.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Jakob
Newbie
Newbie
Posts: 13
Joined: Fri Dec 05, 2003 5:00 am

Post by Jakob » Wed Feb 25, 2004 2:10 pm

Thanks Chris.

But: Do you mean that I should use ony one HorizBar series for all my values? Or is it just a typo? However when I tried to use 2 HorizBars with 2 values each (with the same y-value) they appear fine in the graph, but only one of them gets there associated name printed on the left axis?

Regards
/Jakob

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Thu Feb 26, 2004 8:43 am

Hi --
Do you mean that I should use ony one HorizBar series for all my values? Or is it just a typo? However when I tried to use 2 HorizBars with 2 values each (with the same y-value) they appear fine in the graph, but only one of them gets there associated name printed on the left axis?
Did you run the code I sent you in my last message? Let me give it to you again without the typos :D:

Code: Select all

private void Form1_Load(object sender, System.EventArgs e) { 
   tChart1.Aspect.View3D = false; 
   horizBar1.Marks.Visible = false;          
   horizBar1.Add (3,1,"DiagnoseX", Color.Green); 
   horizBar1.Add (2,1,"DiagnoseX", Color.Red); 
   horizBar1.Add (-3,2,"DiagnoseC", Color.Green); 
   horizBar1.Add (-2,2,"DiagnoseC", Color.Red); 
   horizBar1.Origin = 1; 
} 
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply