Beispiel #1
0
 public DataTable()
     : base()
 {
     Name             = "DataTable";
     VisualProperties = new DataTableVisualProperties();
     Rows             = new NamedItemCollection <DataRow>();
 }
Beispiel #2
0
        private void AfterDeserialization()
        {
            if (VisualProperties == null)
            {
                VisualProperties = new DataTableVisualProperties(name);
            }
            if (VisualProperties.Title == null)
            {
                VisualProperties.Title = name;
            }

            #region Backwards Compatability Histogram Visual Properties
            var rowProperties = Rows.Select(r => r.VisualProperties).ToList();
            if (rowProperties.Any(r => r.Bins.HasValue))
            {
                VisualProperties.HistogramBins = rowProperties.Where(r => r.Bins.HasValue).Max(r => r.Bins.Value);
            }
            if (rowProperties.Any(r => r.ExactBins.HasValue))
            {
                VisualProperties.HistogramExactBins = rowProperties.Where(r => r.ExactBins.HasValue).Any(r => r.ExactBins.Value);
            }
            if (rowProperties.Any(r => r.Aggregation.HasValue))
            {
                var maxOccurrence = rowProperties
                                    .Where(r => r.Aggregation.HasValue).Select(r => r.Aggregation.Value)
                                    .GroupBy(x => x).OrderByDescending(x => x.Count())
                                    .First().Key;
                VisualProperties.HistogramAggregation = (DataTableVisualProperties.DataTableHistogramAggregation)maxOccurrence;
            }
            #endregion
        }
 public IndexedDataTable()
     : base()
 {
     VisualProperties = new DataTableVisualProperties();
     rows             = new NamedItemCollection <IndexedDataRow <T> >();
     this.RegisterRowsEvents();
 }
 public IndexedDataTable(string name, string description)
     : base(name, description)
 {
     VisualProperties = new DataTableVisualProperties(name);
     rows             = new NamedItemCollection <IndexedDataRow <T> >();
     this.RegisterRowsEvents();
 }
Beispiel #5
0
 private void AfterDeserialization()
 {
     if (VisualProperties == null)
     {
         VisualProperties = new DataTableVisualProperties(name);
     }
     if (VisualProperties.Title == null)
     {
         VisualProperties.Title = name;
     }
 }
 protected DataTableVisualProperties(DataTableVisualProperties original, Cloner cloner)
     : base(original, cloner)
 {
     if (original.titleFont != null)
     {
         this.titleFont = (Font)original.titleFont.Clone();
     }
     if (original.axisTitleFont != null)
     {
         this.axisTitleFont = (Font)original.axisTitleFont.Clone();
     }
     this.title                        = original.title;
     this.xAxisTitle                   = original.xAxisTitle;
     this.yAxisTitle                   = original.yAxisTitle;
     this.secondXAxisTitle             = original.secondXAxisTitle;
     this.secondYAxisTitle             = original.secondYAxisTitle;
     this.xAxisMinimumAuto             = original.xAxisMinimumAuto;
     this.xAxisMinimumFixedValue       = original.xAxisMinimumFixedValue;
     this.xAxisMaximumAuto             = original.xAxisMaximumAuto;
     this.xAxisMaximumFixedValue       = original.xAxisMaximumFixedValue;
     this.secondXAxisMinimumAuto       = original.secondXAxisMinimumAuto;
     this.secondXAxisMinimumFixedValue = original.secondXAxisMinimumFixedValue;
     this.secondXAxisMaximumAuto       = original.secondXAxisMaximumAuto;
     this.secondXAxisMaximumFixedValue = original.secondXAxisMaximumFixedValue;
     this.yAxisMinimumAuto             = original.yAxisMinimumAuto;
     this.yAxisMinimumFixedValue       = original.yAxisMinimumFixedValue;
     this.yAxisMaximumAuto             = original.yAxisMaximumAuto;
     this.yAxisMaximumFixedValue       = original.yAxisMaximumFixedValue;
     this.secondYAxisMinimumAuto       = original.secondYAxisMinimumAuto;
     this.secondYAxisMinimumFixedValue = original.secondYAxisMinimumFixedValue;
     this.secondYAxisMaximumAuto       = original.secondYAxisMaximumAuto;
     this.secondYAxisMaximumFixedValue = original.secondYAxisMaximumFixedValue;
     this.xAxisLogScale                = original.xAxisLogScale;
     this.secondXAxisLogScale          = original.secondXAxisLogScale;
     this.yAxisLogScale                = original.yAxisLogScale;
     this.secondYAxisLogScale          = original.secondYAxisLogScale;
     this.histogramBins                = original.histogramBins;
     this.histogramExactBins           = original.histogramExactBins;
     this.histogramAggregation         = original.histogramAggregation;
 }
Beispiel #7
0
 public DataTable(string name, string description)
     : base(name, description)
 {
     VisualProperties = new DataTableVisualProperties(name);
     Rows             = new NamedItemCollection <DataRow>();
 }
Beispiel #8
0
 public DataTable(string name)
   : base(name) {
   VisualProperties = new DataTableVisualProperties(name);
   Rows = new NamedItemCollection<DataRow>();
 }
Beispiel #9
0
 public DataTable()
   : base() {
   Name = "DataTable";
   VisualProperties = new DataTableVisualProperties();
   Rows = new NamedItemCollection<DataRow>();
 }
Beispiel #10
0
 private void AfterDeserialization() {
   if (VisualProperties == null) VisualProperties = new DataTableVisualProperties(name);
   if (VisualProperties.Title == null) VisualProperties.Title = name;
 }
 protected DataTableVisualProperties(DataTableVisualProperties original, Cloner cloner)
   : base(original, cloner) {
   if (original.titleFont != null)
     this.titleFont = (Font)original.titleFont.Clone();
   if (original.axisTitleFont != null)
     this.axisTitleFont = (Font)original.axisTitleFont.Clone();
   this.title = original.title;
   this.xAxisTitle = original.xAxisTitle;
   this.yAxisTitle = original.yAxisTitle;
   this.secondXAxisTitle = original.secondXAxisTitle;
   this.secondYAxisTitle = original.secondYAxisTitle;
   this.xAxisMinimumAuto = original.xAxisMinimumAuto;
   this.xAxisMinimumFixedValue = original.xAxisMinimumFixedValue;
   this.xAxisMaximumAuto = original.xAxisMaximumAuto;
   this.xAxisMaximumFixedValue = original.xAxisMaximumFixedValue;
   this.secondXAxisMinimumAuto = original.secondXAxisMinimumAuto;
   this.secondXAxisMinimumFixedValue = original.secondXAxisMinimumFixedValue;
   this.secondXAxisMaximumAuto = original.secondXAxisMaximumAuto;
   this.secondXAxisMaximumFixedValue = original.secondXAxisMaximumFixedValue;
   this.yAxisMinimumAuto = original.yAxisMinimumAuto;
   this.yAxisMinimumFixedValue = original.yAxisMinimumFixedValue;
   this.yAxisMaximumAuto = original.yAxisMaximumAuto;
   this.yAxisMaximumFixedValue = original.yAxisMaximumFixedValue;
   this.secondYAxisMinimumAuto = original.secondYAxisMinimumAuto;
   this.secondYAxisMinimumFixedValue = original.secondYAxisMinimumFixedValue;
   this.secondYAxisMaximumAuto = original.secondYAxisMaximumAuto;
   this.secondYAxisMaximumFixedValue = original.secondYAxisMaximumFixedValue;
   this.xAxisLogScale = original.xAxisLogScale;
   this.secondXAxisLogScale = original.secondXAxisLogScale;
   this.yAxisLogScale = original.yAxisLogScale;
   this.secondYAxisLogScale = original.secondYAxisLogScale;
 }