示例#1
0
        private static void FillNumCache <T>(CT_NumData cache, IChartDataSource <T> dataSource)
        {
            int pointCount = dataSource.PointCount;

            cache.AddNewPtCount().val = (uint)pointCount;
            for (int index = 0; index < pointCount; ++index)
            {
                double d = Convert.ToDouble((object)dataSource.GetPointAt(index));
                if (!double.IsNaN(d))
                {
                    CT_NumVal ctNumVal = cache.AddNewPt();
                    ctNumVal.idx = (uint)index;
                    ctNumVal.v   = d.ToString();
                }
            }
        }
示例#2
0
        private static void FillNumCache <T>(CT_NumData cache, IChartDataSource <T> dataSource)
        {
            int numOfPoints = dataSource.PointCount;

            cache.AddNewPtCount().val = (uint)(numOfPoints);
            for (int i = 0; i < numOfPoints; ++i)
            {
                double value = Convert.ToDouble(dataSource.GetPointAt(i));
                if (!double.IsNaN(value))
                {
                    CT_NumVal ctNumVal = cache.AddNewPt();
                    ctNumVal.idx = (uint)(i);
                    ctNumVal.v   = (value.ToString());
                }
            }
        }