private void AfterDeserialization() { if (VisualProperties == null) { VisualProperties = new DataRowVisualProperties(); } }
public DataRow(string name) : base(name) { if (string.IsNullOrEmpty(name)) { throw new ArgumentException("Name of a DataRow cannot be empty", name); } VisualProperties = new DataRowVisualProperties(name); values = new ObservableList <double>(); }
public DataRow(string name, string description, IEnumerable <double> values) : base(name, description) { if (string.IsNullOrEmpty(name)) { throw new ArgumentException("Name of a DataRow cannot be empty", name); } VisualProperties = new DataRowVisualProperties(name); this.values = new ObservableList <double>(values); }
protected DataRowVisualProperties(DataRowVisualProperties original, Cloner cloner) : base(original, cloner) { this.chartType = original.chartType; this.secondYAxis = original.secondYAxis; this.secondXAxis = original.secondXAxis; this.color = original.color; this.lineStyle = original.lineStyle; this.startIndexZero = original.startIndexZero; this.lineWidth = original.lineWidth; this.scaleFactor = original.scaleFactor; this.displayName = original.displayName; this.isVisibleInLegend = original.isVisibleInLegend; }
public DataRow CreateSelectedDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) { IDictionary<int, IList<int>> selection = PreprocessingData.Selection; int variableIndex = PreprocessingData.GetColumnIndex(variableName); if (selection.Keys.Contains(variableIndex)) { List<int> selectedIndices = new List<int>(selection[variableIndex]); //need selection with more than 1 value if (selectedIndices.Count < 2) return null; selectedIndices.Sort(); int start = selectedIndices[0]; int end = selectedIndices[selectedIndices.Count - 1]; DataRow rowSelect = CreateDataRowRange(variableName, start, end, chartType); return rowSelect; } else return null; }
private ChartDashStyle ConvertLineStyle(DataRowVisualProperties.DataRowLineStyle dataRowLineStyle) { switch (dataRowLineStyle) { case DataRowVisualProperties.DataRowLineStyle.Dash: return ChartDashStyle.Dash; case DataRowVisualProperties.DataRowLineStyle.DashDot: return ChartDashStyle.DashDot; case DataRowVisualProperties.DataRowLineStyle.DashDotDot: return ChartDashStyle.DashDotDot; case DataRowVisualProperties.DataRowLineStyle.Dot: return ChartDashStyle.Dot; case DataRowVisualProperties.DataRowLineStyle.NotSet: return ChartDashStyle.NotSet; case DataRowVisualProperties.DataRowLineStyle.Solid: return ChartDashStyle.Solid; default: return ChartDashStyle.NotSet; } }
protected DataRowVisualProperties(DataRowVisualProperties original, Cloner cloner) : base(original, cloner) { this.chartType = original.chartType; this.secondYAxis = original.secondYAxis; this.secondXAxis = original.secondXAxis; this.color = original.color; this.lineStyle = original.lineStyle; this.startIndexZero = original.startIndexZero; this.lineWidth = original.lineWidth; this.bins = original.bins; this.exactBins = original.exactBins; this.scaleFactor = original.scaleFactor; this.displayName = original.displayName; this.isVisibleInLegend = original.isVisibleInLegend; }
public IndexedDataRow(string name, string description) : base(name, description) { values = new ObservableList <Tuple <T, double> >(); VisualProperties = new DataRowVisualProperties(name); }
public IndexedDataRow() { values = new ObservableList <Tuple <T, double> >(); VisualProperties = new DataRowVisualProperties(); }
public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) { IList<double> values = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableName)); DataRow row = new DataRow(variableName, "", values); row.VisualProperties.ChartType = chartType; return row; }
public List<DataRow> CreateAllDataRows(DataRowVisualProperties.DataRowChartType chartType) { List<DataRow> dataRows = new List<DataRow>(); foreach (var name in PreprocessingData.GetDoubleVariableNames()) dataRows.Add(CreateDataRow(name, chartType)); return dataRows; }
public List<DataRow> CreateAllSelectedDataRows(DataRowVisualProperties.DataRowChartType chartType) { List<DataRow> dataRows = new List<DataRow>(); foreach (var name in PreprocessingData.GetDoubleVariableNames()) { DataRow row = CreateSelectedDataRow(name, chartType); if (row != null) dataRows.Add(row); } return dataRows; }
public DataRow CreateDataRowRange(string variableName, int start, int end, DataRowVisualProperties.DataRowChartType chartType) { IList<double> values = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableName)); IList<double> valuesRange = new List<double>(); for (int i = 0; i < values.Count; i++) { if (i >= start && i <= end) valuesRange.Add(values[i]); else valuesRange.Add(Double.NaN); } DataRow row = new DataRow(variableName, "", valuesRange); row.VisualProperties.ChartType = chartType; return row; }
public DataRow(string name, string description, IEnumerable<double> values) : base(name, description) { if (string.IsNullOrEmpty(name)) throw new ArgumentException("Name of a DataRow cannot be empty", name); VisualProperties = new DataRowVisualProperties(name); this.values = new ObservableList<double>(values); }
public DataRow(string name) : base(name) { if (string.IsNullOrEmpty(name)) throw new ArgumentException("Name of a DataRow cannot be empty", name); VisualProperties = new DataRowVisualProperties(name); values = new ObservableList<double>(); }
private void AfterDeserialization() { if (VisualProperties == null) VisualProperties = new DataRowVisualProperties(); }