Esempio n. 1
0
        public void Setting()
        {
            Spct = new Maya_Spectrometer();
            if (!Spct.Connect())
            {
                MessageBox.Show("not Connected");
            }

            // Chart Setting
            ChartDatas  = new ChartValues <double>();
            YMin        = 0;
            YMax        = 10000;
            AxisStep    = 100;
            AxisUnit    = 5;
            LabelFormat = val => val.ToString(  );
            Wave        = Spct.GetWaveLen().Skip(200).Where((x, i) => i % 10 == 0).Select(x => x).ToArray();


            var mapper = Mappers.Xy <double>()
                         .X((x, i) => Wave[i]) //use DateTime.Ticks as X
                         .Y((x, i) => x);      //use the value property as Y

            Charting.For <double>(mapper);
        }