Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DateTime axisX in seconds
04-06-2015, 09:50 AM
Post: #4
RE: DateTime axisX in seconds
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.

[Image: bFIiyS.jpg]

with the following code

Code:
public partial class Form1 : Form
    {
        public System.DateTime m_Date = System.DateTime.Now;
        private Random m_RandomGen = new Random(123);
        public Form1()
        {
            InitializeComponent();
            scope1.XAxis.CustomLabel += scope1_XAxis_CustomLabel;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            
            m_Date = m_Date.AddHours(1);  
            scope1.Channels[0].Data.AddXYPoint(m_Date.ToBinary(), 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)).ToString("HH:mm:ss");
        }
    }
is that I'm doing something wrong. is pocible ?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
DateTime axisX in seconds - Rashit - 06-24-2014, 02:41 PM
RE: DateTime axisX in seconds - Rashit - 06-24-2014, 06:49 PM
RE: DateTime axisX in seconds - Dave - 04-03-2015, 10:18 PM
RE: DateTime axisX in seconds - manutek - 04-06-2015 09:50 AM
RE: DateTime axisX in seconds - Dave - 04-20-2015, 02:30 AM
RE: DateTime axisX in seconds - manutek - 04-20-2015, 09:54 AM
RE: DateTime axisX in seconds - mitov - 04-25-2015, 01:46 AM
RE: DateTime axisX in seconds - manutek - 04-26-2015, 08:21 AM
RE: DateTime axisX in seconds - michal - 03-14-2017, 09:23 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)