Exemple #1
0
        /// <summary>
        /// copy data from TimeSeries.Series into Steema.TeeChart.Styles.Series
        /// </summary>
        /// <param name="s"></param>
        /// <param name="tSeries"></param>
        public void FillTimeSeries(Series s, Steema.TeeChart.Styles.Series tSeries)
        {
            if (s.Count == 0)
            {
                return;
            }

            tSeries.XValues.DateTime = true;
            double avg = TimeSeries.Math.AverageOfSeries(s);
            int    sz  = s.Count;

            for (int i = 0; i < sz; i++)
            {
                Point  pt = s[i];
                double x  = pt.DateTime.ToOADate();
                if (!pt.IsMissing)
                {
                    tSeries.Add(x, pt.Value);
                }
                else
                {
                    tSeries.Add(x, avg, System.Drawing.Color.Transparent);
                }
            }
        }
Exemple #2
0
        private static void FillSortedSeries(Series s, Steema.TeeChart.Styles.Series tSeries)
        {
            tSeries.XValues.DateTime = false;
            int sz = s.Count;

            for (int i = 0; i < sz; i++)
            {
                Point  pt = s[i];
                double x  = pt.Percent;
                tSeries.Add(x, pt.Value);
            }
        }
 private void AddPoint(Steema.TeeChart.Styles.Series s)
 {
     s.Add(s.XValues.Last + 1, s.YValues.Last + r.Next(40) - 20.0);
     s.Delete(0);
 }