Example #1
0
        private void SetDefaultFromIndexesOrData(Axis axis, AxisType axisType)
        {
            ArrayList xAxesSeries = this.GetXAxesSeries(axisType, axis.SubAxisName);
            bool      flag        = true;

            foreach (string item in xAxesSeries)
            {
                Series series = base.Common.DataManager.Series[item];
                if (!ChartElement.IndexedSeries(series))
                {
                    flag = false;
                    break;
                }
            }
            if (flag)
            {
                if (axis.Logarithmic)
                {
                    throw new InvalidOperationException(SR.ExceptionChartAreaAxisScaleLogarithmicUnsuitable);
                }
                this.SetDefaultFromIndexes(axis);
            }
            else
            {
                this.SetDefaultFromData(axis);
                axis.EstimateAxis();
            }
        }
 public static bool IndexedSeries(Series series)
 {
     if (series.XValueIndexed)
     {
         return(true);
     }
     return(ChartElement.SeriesXValuesZeros(series));
 }
 public bool SeriesXValuesZeros(params string[] series)
 {
     foreach (string parameter in series)
     {
         if (!ChartElement.SeriesXValuesZeros(this.Common.DataManager.Series[parameter]))
         {
             return(false);
         }
     }
     return(true);
 }