DateTime axisX in seconds - Printable Version +- Forums (http://mitov.com/forum) +-- Forum: .NET 2.0 - 4.0 Components (/forum-8.html) +--- Forum: PlotLab (/forum-29.html) +--- Thread: DateTime axisX in seconds (/thread-3066.html) |
DateTime axisX in seconds - Rashit - 06-24-2014 02:41 PM Hello. How to configure MajorTicks and other parameters to be displayed on the axisX DateTime range in seconds? In the example DateDisplayScopeDemo minimum time display can be set as _mDate.AddHours (1). If you set m_Date.AddSeconds (1), the labels axisX not displayed. RE: DateTime axisX in seconds - Rashit - 06-24-2014 06:49 PM Okay, with this question, I figured out (it was built very few points). Another question: Is it possible to put the time and date in two lines axisX, e.g. 15:32:37 24.06.2014 RE: DateTime axisX in seconds - Dave - 04-03-2015 10:18 PM Have you tried adding a CR and/or LF to the text? Regards, Dave RE: DateTime axisX in seconds - manutek - 04-06-2015 09:50 AM Hi , first thanks for subscribing. I can not add the time on the x axis in the format HH : mm : ss with on precision of the second. with the following code Code: public partial class Form1 : Form RE: DateTime axisX in seconds - Dave - 04-20-2015 02:30 AM Hi! Which version of the labs are you using? Regards, Dave RE: DateTime axisX in seconds - manutek - 04-20-2015 09:54 AM Hi dave I am using: _Windows7 32bits _VS2010 _.NET 4.0 _PlotLabs 7.6.0.0 and I can not find the cause of the problem. :-( RE: DateTime axisX in seconds - mitov - 04-25-2015 01:46 AM (04-20-2015 09:54 AM)manutek Wrote: and I can not find the cause of the problem. :-( Hi Manutek, Thank you! I am sorry for the late reply, I got caught between the 7.6 release and some system problems in the last few days :-( . The problem is that your time period is too small and is getting rounded. If you multiply it by 1000 as example it will work. You may need to reformat the date printing accordingly: private void timer1_Tick(object sender, EventArgs e) { m_Date = m_Date.AddHours(1); scope1.Channels[0].Data.AddXYPoint(m_Date.ToBinary() * 1000, m_RandomGen.NextDouble() * 2000 - 1000); } private void scope1_XAxis_CustomLabel(object sender, Mitov.PlotLab.CustomAxisLabelEventArgs Args) { Args.AxisLabel = System.DateTime.FromBinary((long)Math.Round(Args.SampleValue / 1000 )).ToString("HH:mm:ss"); } RE: DateTime axisX in seconds - manutek - 04-26-2015 08:21 AM thank you very much Mr Mitov ¡¡¡¡ problem solved. RE: DateTime axisX in seconds - michal - 03-14-2017 09:23 AM How to solve it problem without m_Date = m_Date.AddHours(1) ? With a time interval of less than one second. |