public PreprocessingChartContent(PreprocessingChartContent content, Cloner cloner) : base(content, cloner) { this.allInOneMode = content.allInOneMode; this.PreprocessingData = content.PreprocessingData; this.variableItemList = cloner.Clone <ICheckedItemList <StringValue> >(variableItemList); }
public static DataTable CreateHistogram(IFilteredPreprocessingData preprocessingData, string variableName, string groupingVariableName, DataTableVisualProperties.DataTableHistogramAggregation aggregation, LegendOrder legendOrder = LegendOrder.Alphabetically) { var dataTable = new DataTable { VisualProperties = { Title = variableName, HistogramAggregation = aggregation }, }; if (string.IsNullOrEmpty(groupingVariableName)) { var row = PreprocessingChartContent.CreateDataRow(preprocessingData, variableName, DataRowVisualProperties.DataRowChartType.Histogram); row.VisualProperties.IsVisibleInLegend = false; dataTable.Rows.Add(row); return(dataTable); } int variableIndex = preprocessingData.GetColumnIndex(variableName); var variableValues = preprocessingData.GetValues <double>(variableIndex); int groupVariableIndex = preprocessingData.GetColumnIndex(groupingVariableName); var groupingValues = Enumerable.Empty <string>(); if (preprocessingData.VariableHasType <double>(groupVariableIndex)) { groupingValues = preprocessingData.GetValues <double>(groupVariableIndex).Select(x => x.ToString()); } else if (preprocessingData.VariableHasType <string>(groupVariableIndex)) { groupingValues = preprocessingData.GetValues <string>(groupVariableIndex); } else if (preprocessingData.VariableHasType <DateTime>(groupVariableIndex)) { groupingValues = preprocessingData.GetValues <DateTime>(groupVariableIndex).Select(x => x.ToString()); } var groups = groupingValues.Zip(variableValues, Tuple.Create).GroupBy(t => t.Item1, t => t.Item2); if (legendOrder == LegendOrder.Alphabetically) { groups = groups.OrderBy(x => x.Key, new NaturalStringComparer()); } foreach (var group in groups) { var classRow = new DataRow { Name = group.Key, VisualProperties = { ChartType = DataRowVisualProperties.DataRowChartType.Histogram, IsVisibleInLegend = !string.IsNullOrEmpty(groupingVariableName) } }; classRow.Values.AddRange(group); dataTable.Rows.Add(classRow); } return(dataTable); }
public static DataRow CreateDataRow(IFilteredPreprocessingData preprocessingData, string variableName, DataRowVisualProperties.DataRowChartType chartType) { var values = preprocessingData.GetValues <double>(preprocessingData.GetColumnIndex(variableName)); var row = new DataRow(variableName, "", values) { VisualProperties = { ChartType = chartType, StartIndexZero = true } }; return(row); }
public PreprocessingChartContent(IFilteredPreprocessingData preprocessingData) { PreprocessingData = preprocessingData; }
public FilterLogic(IFilteredPreprocessingData preprocessingData) { PreprocessingData = preprocessingData; }
public PreprocessingChartContent(IFilteredPreprocessingData preprocessingData) { PreprocessingData = preprocessingData; }
public DataCompletenessChartContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { }
public TransformationContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { CheckedTransformationList = new CheckedItemList <ITransformation>(); }
public MultiScatterPlotContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { }
public ManipulationContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { }
public LineChartContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { AllInOneMode = true; }
public HistogramContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { Bins = 10; ExactBins = false; }
public HistogramContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { AllInOneMode = false; }
public PreprocessingChartContent(PreprocessingChartContent content, Cloner cloner) : base(content, cloner) { this.allInOneMode = content.allInOneMode; this.PreprocessingData = content.PreprocessingData; this.variableItemList = cloner.Clone<ICheckedItemList<StringValue>>(variableItemList); }
public HistogramContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { AllInOneMode = false; }
public LineChartContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { }
protected ScatterPlotContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { }
public ScatterPlotContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { }
public static ScatterPlot CreateScatterPlot(IFilteredPreprocessingData preprocessingData, string variableNameX, string variableNameY, string variableNameGroup = "-", LegendOrder legendOrder = LegendOrder.Alphabetically) { ScatterPlot scatterPlot = new ScatterPlot(); IList <double> xValues = preprocessingData.GetValues <double>(preprocessingData.GetColumnIndex(variableNameX)); IList <double> yValues = preprocessingData.GetValues <double>(preprocessingData.GetColumnIndex(variableNameY)); var points = xValues.Zip(yValues, (x, y) => new Point2D <double>(x, y)).ToList(); var validPoints = points.Where(p => !double.IsNaN(p.X) && !double.IsNaN(p.Y) && !double.IsInfinity(p.X) && !double.IsInfinity(p.Y)).ToList(); if (validPoints.Any()) { try { double axisMin, axisMax, axisInterval; ChartUtil.CalculateOptimalAxisInterval(validPoints.Min(p => p.X), validPoints.Max(p => p.X), out axisMin, out axisMax, out axisInterval); scatterPlot.VisualProperties.XAxisMinimumAuto = false; scatterPlot.VisualProperties.XAxisMaximumAuto = false; scatterPlot.VisualProperties.XAxisMinimumFixedValue = axisMin; scatterPlot.VisualProperties.XAxisMaximumFixedValue = axisMax; } catch (ArgumentOutOfRangeException) { } // error during CalculateOptimalAxisInterval try { double axisMin, axisMax, axisInterval; ChartUtil.CalculateOptimalAxisInterval(validPoints.Min(p => p.Y), validPoints.Max(p => p.Y), out axisMin, out axisMax, out axisInterval); scatterPlot.VisualProperties.YAxisMinimumAuto = false; scatterPlot.VisualProperties.YAxisMaximumAuto = false; scatterPlot.VisualProperties.YAxisMinimumFixedValue = axisMin; scatterPlot.VisualProperties.YAxisMaximumFixedValue = axisMax; } catch (ArgumentOutOfRangeException) { } // error during CalculateOptimalAxisInterval } //No Grouping if (string.IsNullOrEmpty(variableNameGroup) || variableNameGroup == "-") { ScatterPlotDataRow scdr = new ScatterPlotDataRow(variableNameX + " - " + variableNameY, "", validPoints); scdr.VisualProperties.IsVisibleInLegend = false; scatterPlot.Rows.Add(scdr); return(scatterPlot); } //Grouping int groupVariableIndex = preprocessingData.GetColumnIndex(variableNameGroup); var groupingValues = Enumerable.Empty <string>(); if (preprocessingData.VariableHasType <double>(groupVariableIndex)) { groupingValues = preprocessingData.GetValues <double>(groupVariableIndex).Select(x => x.ToString()); } else if (preprocessingData.VariableHasType <string>(groupVariableIndex)) { groupingValues = preprocessingData.GetValues <string>(groupVariableIndex); } else if (preprocessingData.VariableHasType <DateTime>(groupVariableIndex)) { groupingValues = preprocessingData.GetValues <DateTime>(groupVariableIndex).Select(x => x.ToString()); } var groups = groupingValues.Zip(validPoints, Tuple.Create).GroupBy(t => t.Item1, t => t.Item2); if (legendOrder == LegendOrder.Alphabetically) { groups = groups.OrderBy(x => x.Key, new NaturalStringComparer()); } foreach (var group in groups) { var scdr = new ScatterPlotDataRow { Name = group.Key, VisualProperties = { IsVisibleInLegend = true, PointSize = 6 } }; scdr.Points.AddRange(group); scatterPlot.Rows.Add(scdr); } return(scatterPlot); }
public PreprocessingChartContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { }
protected PreprocessingContent(IFilteredPreprocessingData preprocessingData) { PreprocessingData = preprocessingData; }
public DataGridContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { }
protected PreprocessingContent(PreprocessingContent original, Cloner cloner) : base(original, cloner) { PreprocessingData = cloner.Clone(original.PreprocessingData); }
public StatisticsContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { }
public FilterContent(IFilteredPreprocessingData preprocessingData) : base(preprocessingData) { Filters = new CheckedItemCollection <IFilter>(); IsAndCombination = true; }