private static void FillStringCache <T>(CT_StrData cache, IChartDataSource <T> dataSource) { int pointCount = dataSource.PointCount; cache.AddNewPtCount().val = (uint)pointCount; for (int index = 0; index < pointCount; ++index) { object pointAt = (object)dataSource.GetPointAt(index); if (pointAt != null) { CT_StrVal ctStrVal = cache.AddNewPt(); ctStrVal.idx = (uint)index; ctStrVal.v = pointAt.ToString(); } } }
private static void FillStringCache <T>(CT_StrData cache, IChartDataSource <T> dataSource) { int numOfPoints = dataSource.PointCount; cache.AddNewPtCount().val = (uint)(numOfPoints); for (int i = 0; i < numOfPoints; ++i) { object value = dataSource.GetPointAt(i); if (value != null) { CT_StrVal ctStrVal = cache.AddNewPt(); ctStrVal.idx = (uint)(i); ctStrVal.v = (value.ToString()); } } }