public void ConvertVectorGroup <U> (out IJcwChartVectorGroup <U> convertedVectorGroup) where U : struct { convertedVectorGroup = new JcwChartVectorGroup <U> (AxisTitle, Caption); List <IVector <U> > convertedVectors = new List <IVector <U> > (); foreach (IVector <T> vector in Vectors) { IVector <U> convertedVector = new Vector <U> (vector.Name); for (int vectorIndex = 0; vectorIndex < vector.Data.Count; vectorIndex++) { U convertedValue = (U)Convert.ChangeType(vector.Data[vectorIndex], typeof(U)); convertedVector.Data.Add(convertedValue); } convertedVectors.Add(convertedVector); } if (convertedVectors.Count > 0) { convertedVectorGroup.SetVectors(convertedVectors.ToArray()); } }
public JcwChartDataGroup(IJcwChartVectorGroup <T> labelData) { LabelData = labelData; SeriesData = new List <IJcwChartVectorGroup <T> > (); }
public static void ConvertVectorGroup <U, V> (IJcwChartVectorGroup <U> vectorGroupToConvert, out IJcwChartVectorGroup <V> convertedVectorGroup) where U : struct where V : struct { vectorGroupToConvert.ConvertVectorGroup <V> (out convertedVectorGroup); }