public void ClearChart()
        {
            this.ChartValues.Clear();
            this.ChartValues2.Clear();
            this.ChartValues3.Clear();

            ChartValues2.Add(new MeasureModel
            {
                DateTime = DateTime.Now.AddSeconds(-12),
                Value    = 0
            });

            ChartValues2.Add(new MeasureModel
            {
                DateTime = DateTime.Now.AddSeconds(25),
                Value    = 0
            });

            ChartValues3.Add(new MeasureModel
            {
                DateTime = DateTime.Now.AddSeconds(-12),
                Value    = -7
            });

            ChartValues3.Add(new MeasureModel
            {
                DateTime = DateTime.Now.AddSeconds(25),
                Value    = -7
            });
        }
        //public bool IsReading { get; set; }

        private void Read()
        {
            var r = new Random();

            while (IsReading)
            {
                Thread.Sleep(150);
                var now = DateTime.Now;

                // 随机生成数,测试绘图效果;将ChartValues中的Value替换成想显示的值即可
                _trend1 += r.Next(-8, 10);
                _trend2 += r.Next(-8, 10);
                _trend3 += r.Next(-8, 10);
                _trend4 += r.Next(-8, 10);

                ChartValues1.Add(new MeasureModel
                {
                    DateTime = now,
                    Value    = ports.imus[0] // 左腿IMU
                                             //Value = _trend1
                });

                //ChartValues2.Add(new MeasureModel
                //{
                //    DateTime = now,
                //    Value = _trend2
                //});

                ChartValues3.Add(new MeasureModel
                {
                    DateTime = now,
                    Value    = ports.imus[1] // 右腿IMU
                                             //Value = _trend3
                });

                //ChartValues4.Add(new MeasureModel
                //{
                //    DateTime = now,
                //    Value = _trend4
                //});

                SetAxisLimits(now);

                //lets only use the last NUM_POINTS values
                if (ChartValues1.Count > NUM_POINTS)
                {
                    ChartValues1.RemoveAt(0);
                }
                //if (ChartValues2.Count > NUM_POINTS) ChartValues2.RemoveAt(0);
                if (ChartValues3.Count > NUM_POINTS)
                {
                    ChartValues3.RemoveAt(0);
                }
                //if (ChartValues4.Count > NUM_POINTS) ChartValues4.RemoveAt(0);
            }
        }