internal static Tuple <DataValueType, DataValueType, bool, object> GetSeriesKey(StackedColumnSeries series)
        {
            DataValueType dataValueType = series.ActualYValueType;

            if (dataValueType == DataValueType.Auto)
            {
                if (series.ChartArea != null)
                {
                    XYSeries xySeries = (XYSeries)Enumerable.FirstOrDefault <ColumnSeries>(Enumerable.OfType <ColumnSeries>((IEnumerable)series.ChartArea.GetSeries()), (Func <ColumnSeries, bool>)(s => s.ActualYValueType != DataValueType.Auto));
                    if (xySeries != null)
                    {
                        dataValueType = xySeries.ActualYValueType;
                    }
                }
                if (dataValueType == DataValueType.Auto && series.ActualYDataRange.HasData)
                {
                    dataValueType = ValueHelper.GetDataValueType((object)series.ActualYDataRange.Minimum);
                }
                else
                {
                    series.UpdateActualValueTypes();
                    dataValueType = series.ActualYValueType;
                }
            }
            if (dataValueType == DataValueType.Integer)
            {
                dataValueType = DataValueType.Float;
            }
            return(new Tuple <DataValueType, DataValueType, bool, object>(dataValueType, series.ActualXValueType, series.IsHundredPercent, series.GroupingKey));
        }
Esempio n. 2
0
 private void UpdateActualXValueType(IEnumerable <DataPoint> dataPoints)
 {
     if (this.ActualXValueType != DataValueType.Auto)
     {
         return;
     }
     this.ActualXValueType = ValueHelper.GetDataValueType(Enumerable.Select <XYDataPoint, object>(Enumerable.OfType <XYDataPoint>((IEnumerable)dataPoints), (Func <XYDataPoint, object>)(p => p.XValue)));
 }
Esempio n. 3
0
        private Range <IComparable> GetSizeDataRange()
        {
            IEnumerable <object> sizeValues = this.GetSizeValues((IEnumerable <DataPoint>) this.DataPointsByXValue);
            DataValueType        valueType  = this.ActualSizeValueType;

            if (valueType == DataValueType.Auto)
            {
                valueType = ValueHelper.GetDataValueType(sizeValues);
            }
            return(ValueAggregator.GetAggregator(valueType).GetRange(sizeValues));
        }
Esempio n. 4
0
 private DataValueType GetSizeValueType()
 {
     if (this.SizeValueType == DataValueType.Auto)
     {
         BubbleDataPoint bubbleDataPoint = Enumerable.FirstOrDefault <BubbleDataPoint>(Enumerable.Where <BubbleDataPoint>(Enumerable.OfType <BubbleDataPoint>((IEnumerable)this.DataPoints), (Func <BubbleDataPoint, bool>)(item => item.SizeValue != null)));
         if (bubbleDataPoint != null)
         {
             return(ValueHelper.GetDataValueType(bubbleDataPoint.SizeValue));
         }
     }
     return(this.SizeValueType);
 }
Esempio n. 5
0
        protected void UpdateActualYValueType()
        {
            DataValueType dataValueType = this.YValueType;

            if (dataValueType == DataValueType.Auto)
            {
                dataValueType = this.GetYValueType((IEnumerable <DataPoint>) this.DataPoints);
                if (dataValueType == DataValueType.Auto && this.YDataRange.HasValue)
                {
                    dataValueType = ValueHelper.GetDataValueType(this.YDataRange.Value);
                }
            }
            this.ActualYValueType = dataValueType;
        }
Esempio n. 6
0
        private void UpdateActualXValueType()
        {
            DataValueType dataValueType = this.XValueType;

            if (dataValueType == DataValueType.Auto)
            {
                dataValueType = ValueHelper.GetDataValueType(Enumerable.Select <XYDataPoint, object>(Enumerable.OfType <XYDataPoint>((IEnumerable)this.DataPoints), (Func <XYDataPoint, object>)(p => p.XValue)));
                if (dataValueType == DataValueType.Auto && this.XDataRange.HasValue)
                {
                    dataValueType = ValueHelper.GetDataValueType(this.XDataRange.Value);
                }
            }
            this.ActualXValueType = dataValueType;
        }
Esempio n. 7
0
 protected virtual DataValueType GetYValueType(IEnumerable <DataPoint> dataPoints)
 {
     foreach (XYDataPoint xyDataPoint in dataPoints)
     {
         if (xyDataPoint.YValue != null)
         {
             DataValueType dataValueType = ValueHelper.GetDataValueType(xyDataPoint.YValue);
             if (dataValueType != DataValueType.Auto)
             {
                 return(dataValueType);
             }
         }
     }
     return(DataValueType.Auto);
 }