Correct Date Time display on X axis & Graph orientation

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Mods
Newbie
Newbie
Posts: 8
Joined: Mon Aug 09, 2004 4:00 am
Location: Sussex, UK
Contact:

Correct Date Time display on X axis & Graph orientation

Post by Mods » Mon Aug 16, 2004 8:33 am

Hello, using TeeChart for Visual Studio, with .NET in C# i am having a couple of problems developing my program for the pocket PC 2003:

1. I have set my x series to date time values, and the x axis is set as date time values. The data is constantly added to the graph dynamically with a double y value and the x value is a date time (ie. DateTime.Now). The problem is that my values roll across the graph correctly in the corrrect date time increment, but the labels on the graph only ever show "01/01/01 12:00" all the time over and over again, is this a bug, or am i forgetting something?

2. working with the pocket pc, space is a premium so i have my graph placed on a tab page taking up the entire screen (246 x 302), but i want to make use of this space by the graph being displyed landscape as oposed to portrait, is there any way to do this?

Here is my code regarding the the graph:

this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage1.Location = new System.Drawing.Point(0, 0);
this.tabPage1.Size = new System.Drawing.Size(246, 302);
this.tChart1 = new TChart();
this.tChart1.Bounds = new Rectangle(0,0,246,278);
this.tChart1.Parent = this.tabPage2;
//this.tChart1. - need to change from portrait to landscape:
this.tChart1.Legend.Visible = false;
this.tChart1.Aspect.View3D = false;
this.tChart1.Axes.Left.Automatic = false;
this.tChart1.Axes.Left.Minimum = 0.0;
this.tChart1.Axes.Left.Maximum = 10.0;
this.tChart1.Axes.Bottom.Automatic = true;
this.tChart1.Axes.Bottom.Minimum = Steema.TeeChart.Utils.DateTime(DateTime.Now);
this.tChart1.Axes.Bottom.Labels.OnAxis = false;
this.tChart1.Axes.Bottom.Increment =
Steema.TeeChart.Utils.DateTimeStep[(int)Steema.TeeChart.DateTimeSteps.TenSeconds];

this.tChart1.Axes.Bottom.Labels.DateTimeFormat = "dd/MM/yy hh:mm:ss";

this.tChart1.Axes.Bottom.Labels.ExactDateTime = true;
this.tChart1.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value;

//add the series to the graph:
this.lineSeriesArray = new Steema.TeeChart.Styles.FastLine();
this.lineSeriesArray.ColorEach = false;
this.lineSeriesArray.Title = nodeListParam.Attributes.Item(0).InnerText;//first item is name

this.lineSeriesArray.XValues.DateTime = true;
this.lineSeriesArray.DrawAllPoints = false;
this.lineSeriesArray.AutoRepaint = false;
this.tChart1.Series.Add(this.lineSeriesArray);
this.lineSeriesArray.Clear();

Any help for these 2 problems would be grately appriciated,

Matthew

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 Aug 16, 2004 12:23 pm

Hi Matthew,
1. I have set my x series to date time values, and the x axis is set as date time values. The data is constantly added to the graph dynamically with a double y value and the x value is a date time (ie. DateTime.Now). The problem is that my values roll across the graph correctly in the corrrect date time increment, but the labels on the graph only ever show "01/01/01 12:00" all the time over and over again, is this a bug, or am i forgetting something?
No, this appears to be a bug. I have added the issue to the list of defects meaning that the issue will be studied before the next maintenance release.
2. working with the pocket pc, space is a premium so i have my graph placed on a tab page taking up the entire screen (246 x 302), but i want to make use of this space by the graph being displyed landscape as oposed to portrait, is there any way to do this?
Mmm .. you could try using the Horiz Line or Horiz bar series.
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/

Mods
Newbie
Newbie
Posts: 8
Joined: Mon Aug 09, 2004 4:00 am
Location: Sussex, UK
Contact:

Post by Mods » Mon Aug 16, 2004 4:09 pm

OK, for the first point if its a bug, then fair enough theres nothing we can do. In the second case, if the only way to change the orientation of the graph is say horizontal line series, then i would require a method that allows me to plot dateTime values on the Y axis and double values on the X axis. The current add method has no overload with these parameters, and this may be a design issue for a future release as i am sure there will be others requiring landscape graphs, especially for Pocket PC's.

Could you inform me when the next updated version is released please, or if you come across a solution in the meantime let me know asap,

Matthew

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 » Tue Aug 17, 2004 9:34 am

Hi Matthew,
In the second case, if the only way to change the orientation of the graph is say horizontal line series, then i would require a method that allows me to plot dateTime values on the Y axis and double values on the X axis. The current add method has no overload with these parameters, and this may be a design issue for a future release as i am sure there will be others requiring landscape graphs, especially for Pocket PC's.
You can plot datetime values on the YAxis .. set the DateTime property for this valuelist to true (see Steema.TeeChart.Styles.ValueList.DateTime Property) and then use the DateTime.ToOADate() method (see http://msdn.microsoft.com/library/defau ... etopic.asp).
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/

Mods
Newbie
Newbie
Posts: 8
Joined: Mon Aug 09, 2004 4:00 am
Location: Sussex, UK
Contact:

Post by Mods » Wed Aug 18, 2004 9:26 am

Thanks for your speedy reply Chris, but I have realised some things from then. I am already plotting using the equivalent of a horizontal Line series. When the PDA is turned on it side I will get vertical lines coming up from the y-axis.

I ultimately need to plot vertical lines (not bar charts) coming from the x-axis at the bottom, and against the y-axis on the right, with the origin in the bottom right corner. The y values need to be DateTime values and x values need to be double values increasing right to left.

I can find no vertical line series, so any ideas would be most helpful, could the customPoint series be used?

Matthew

P.S. The link in your last post was broken and led to a non-existent page.

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 » Wed Aug 18, 2004 10:02 am

Hi Matthew,
I ultimately need to plot vertical lines (not bar charts) coming from the x-axis at the bottom, and against the y-axis on the right, with the origin in the bottom right corner. The y values need to be DateTime values and x values need to be double values increasing right to left.
OK. Is this when the PDA is vertical or when it is rotated anti-clockwise 90º?
P.S. The link in your last post was broken and led to a non-existent page.
The link in my last post is functional. What's happened is that the closing bracket and full stop have been included into the link by the web forum's parser.
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/

Mods
Newbie
Newbie
Posts: 8
Joined: Mon Aug 09, 2004 4:00 am
Location: Sussex, UK
Contact:

Post by Mods » Wed Aug 18, 2004 10:57 am

This is when the PDA is vertical, so when its turned on its side (rotate 90 clockwise) it looks like a normal line series, with values being added left to right.

Matthew

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 Aug 19, 2004 10:30 am

Hi Matthew,
This is when the PDA is vertical, so when its turned on its side (rotate 90 clockwise) it looks like a normal line series, with values being added left to right.
Something like this:

Code: Select all

Steema.TeeChart.Styles.HorizLine horizLine1 = new Steema.TeeChart.Styles.HorizLine(tChart1.Chart);
			
tChart1.Axes.Bottom.Inverted = true;
tChart1.Axes.Right.Labels.Angle = 90;
tChart1.Axes.Bottom.Labels.Angle = 90;
tChart1.Legend.Visible = false;
tChart1.Header.Visible = false;
tChart1.Aspect.View3D = false;

horizLine1.FillSampleValues(10);
horizLine1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right;
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/

Mods
Newbie
Newbie
Posts: 8
Joined: Mon Aug 09, 2004 4:00 am
Location: Sussex, UK
Contact:

Post by Mods » Thu Aug 19, 2004 11:27 am

Thankyou very much chris, I now have 1 series working. The only problem is that changing the label's angle properties seem to have no effect, no matter what value I change them to? Is this another bug, or do i need to do something else?

this.tChart2.Axes.Bottom.Labels.Angle = 270;
this.tChart2.Axes.Right.Labels.Angle = 270;

Matthew

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 Aug 19, 2004 11:48 am

Hi Matthew,
Thankyou very much chris, I now have 1 series working. The only problem is that changing the label's angle properties seem to have no effect, no matter what value I change them to?
Mmm, have you tried testing the code in a normal WinForm? It works there. At this precise moment in time I cannot confirm if this code works with TeeChart.Pocket.dll.
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/

Mods
Newbie
Newbie
Posts: 8
Joined: Mon Aug 09, 2004 4:00 am
Location: Sussex, UK
Contact:

Post by Mods » Tue Aug 24, 2004 10:52 am

Yes, it seems to work fine in the normal libary, as it must do for you there, but unfortunately it has no effect using the pocket libary for the pda/pocket pc. This may be another bug you may need to look into for the next maintence release!

Thanks for all your help, Matthew.

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 » Fri Aug 27, 2004 9:25 am

Hi ---
Yes, it seems to work fine in the normal libary, as it must do for you there, but unfortunately it has no effect using the pocket libary for the pda/pocket pc. This may be another bug you may need to look into for the next maintence release!
OK, I've been able to confirm this issue and have added it to our list of defects, meaning that a fix to it will be considered for inclusion into the next maintenance release.
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