Beispiel #1
0
        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());
            }
        }
Beispiel #2
0
 public JcwChartDataGroup(IJcwChartVectorGroup <T> labelData)
 {
     LabelData  = labelData;
     SeriesData = new List <IJcwChartVectorGroup <T> > ();
 }
Beispiel #3
0
 public static void ConvertVectorGroup <U, V> (IJcwChartVectorGroup <U> vectorGroupToConvert, out IJcwChartVectorGroup <V> convertedVectorGroup)
     where U : struct
     where V : struct
 {
     vectorGroupToConvert.ConvertVectorGroup <V> (out convertedVectorGroup);
 }