Page 1 of 1

Correct Date Time display on X axis & Graph orientation

Posted: Mon Aug 16, 2004 8:33 am
by 8126493
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

Posted: Mon Aug 16, 2004 12:23 pm
by Chris
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.

Posted: Mon Aug 16, 2004 4:09 pm
by 8126493
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

Posted: Tue Aug 17, 2004 9:34 am
by Chris
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).

Posted: Wed Aug 18, 2004 9:26 am
by 8126493
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.

Posted: Wed Aug 18, 2004 10:02 am
by Chris
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.

Posted: Wed Aug 18, 2004 10:57 am
by 8126493
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

Posted: Thu Aug 19, 2004 10:30 am
by Chris
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;

Posted: Thu Aug 19, 2004 11:27 am
by 8126493
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

Posted: Thu Aug 19, 2004 11:48 am
by Chris
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.

Posted: Tue Aug 24, 2004 10:52 am
by 8126493
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.

Posted: Fri Aug 27, 2004 9:25 am
by Chris
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.