Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net
 Real-Time Graphics Tools for .Net (VB and C#)
 Showing elapsed time on the x-axis

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
soundar Posted - 29 Feb 2008 : 02:37:03
Sorry, I posted this on another forum by mistake.

Is there any way to show the elapsed time on the x-axis, starting at 00:00:00 instead of the actual time?
Thanks.
1   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 29 Feb 2008 : 09:32:02
There is no "elapsed time" scale; time scales must be initialized with valid date/time record.

You cannot use a start time of January 1, 1 AD, which would coorespond to a start time of 0.

But all you are interested in representation of an elapsed time scale. So just start your time scale with todays date (or any date really), initial time - 0:00:00. And end you time scale with todays date, some other time - 3:30:00. Use a TimeAxisLabels time label format that does not show the date, only the time. See the example program ScatterPlots.ScatterPoints.

ChartCalendar currentDate = new ChartCalendar();
ChartCalendar.SetTOD(currentDate,0,0,0);
.
.
.
TimeAxisLabels xAxisLab = new TimeAxisLabels(xAxis);
// Get rid of the initial date crossover label under the 0:00:00
xAxisLab.DateCrossoverMode = ChartObj.NO_DATECROSSOVER;

xAxisLab.AxisLabelsFormat = ChartObj.TIMEDATEFORMAT_24HMS;


If you start with a time scale in the 0:00:00 - XX:XX:XX range you must make sure that the time stamp on the data you use to update the real-time variable represents the proper time. Use the overlaod of SetCurrentValue that uses an explicit time stamp.

ChartCalendar tod = new ChartCalendar();  // get current time
// Increment elapsed time 10 seconds for each update.
ChartCalendar.SetTODSeconds(currentDate, 10 * updateCounter);

currentTemperature1.SetCurrentValue(tod, currentTemperatureValue1);
updateCounter++;





Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07