Example #1
0
 void OnTimerElapsed(object sender, ElapsedEventArgs e)
 {
     Device.BeginInvokeOnMainThread(() => {
         if (isRunning)
         {
             if (sensor != null && sensor.IsData)
             {
                 chart.SuspendRender();
                 xAxisSeriesData.AddData(sensor.GetXValue());
                 yAxisSeriesData.AddData(sensor.GetYValue());
                 zAxisSeriesData.AddData(sensor.GetZValue());
                 chart.ResumeRender();
             }
             timer.Start();
         }
     });
 }
Example #2
0
 void OnTimerElapsed(object sender, ElapsedEventArgs e)
 {
     Device.BeginInvokeOnMainThread(() => {
         if (isRunning)
         {
             if (sensor != null && sensor.IsData)
             {
                 chart.SuspendRender();
                 XAxisSeriesData.Add(new DateTimeData(DateTime.Now, sensor.GetXValue()));
                 RemoveExcessData(XAxisSeriesData);
                 YAxisSeriesData.Add(new DateTimeData(DateTime.Now, sensor.GetYValue()));
                 RemoveExcessData(YAxisSeriesData);
                 ZAxisSeriesData.Add(new DateTimeData(DateTime.Now, sensor.GetZValue()));
                 RemoveExcessData(ZAxisSeriesData);
                 chart.ResumeRender();
             }
             timer.Start();
         }
     });
 }