private void CreateTypeRow() { DataAnnotationRow row = NewAnnotationRow(); int count = 0; for (int i = 0; i < mdata.ColumnCount; i++) { row[count++] = "Expression"; } for (int i = 0; i < mdata.CategoryColumnCount; i++) { row[count++] = "Category"; } for (int i = 0; i < mdata.NumericColumnCount; i++) { row[count++] = "Numeric"; } for (int i = 0; i < mdata.StringColumnCount; i++) { row[count++] = "Text"; } for (int i = 0; i < mdata.MultiNumericColumnCount; i++) { row[count++] = "Multi-numeric"; } AddAnnotationRow(row, "Type", "Type of the column."); }
private void CreateAnnotationRows() { CreateTypeRow(); for (int i = 0; i < mdata.CategoryRowCount; i++) { DataAnnotationRow row = NewAnnotationRow(); for (int j = 0; j < mdata.ColumnCount; j++) { row[j] = StringUtils.Concat(";", mdata.GetCategoryRowAt(i)[j] ?? new string[0]); } AddAnnotationRow(row, mdata.CategoryRowNames[i], mdata.CategoryRowDescriptions[i]); } for (int i = 0; i < mdata.NumericRowCount; i++) { DataAnnotationRow row = NewAnnotationRow(); for (int j = 0; j < mdata.ColumnCount; j++) { row[j] = "" + mdata.NumericRows[i][j]; } AddAnnotationRow(row, mdata.NumericRowNames[i], mdata.NumericRowDescriptions[i]); } }