Exemplo n.º 1
0
        private static ChartPoint GetChartPoint(bool isClass, PointTracker tracker, int index, T value)
        {
            ChartPoint cp;

            if (!isClass)
            {
                if (tracker.Indexed.TryGetValue(index, out cp))
                {
                    return(cp);
                }
                cp = new ChartPoint
                {
                    Instance = value,
                    Key      = index
                };
                tracker.Indexed[index] = cp;
            }
            else
            {
                if (tracker.Referenced.TryGetValue(value, out cp))
                {
                    return(cp);
                }
                cp = new ChartPoint
                {
                    Instance = value,
                    Key      = index
                };
                tracker.Referenced[value] = cp;
            }
            return(cp);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets series that owns the values
        /// </summary>
        /// <param name="view"></param>
        /// <returns></returns>
        public PointTracker GetTracker(ISeriesView view)
        {
            PointTracker tracker;

            if (Trackers.TryGetValue(view, out tracker))
            {
                return(tracker);
            }

            tracker        = new PointTracker();
            Trackers[view] = tracker;

            return(tracker);
        }
Exemplo n.º 3
0
 private static bool IsGarbage(ChartPoint point, PointTracker tracker)
 {
     return(point.Gci < tracker.Gci ||
            double.IsNaN(point.X) || double.IsNaN(point.Y));
 }