コード例 #1
0
 private void CompleteAxisAreaValue(DateTimeMinAndMaxValue result)
 {
     if (result.MinTime == null)
     {
         if (result.MaxTime != null && this._labelStep != null)
         {
             result.MinTime = result.MaxTime.Value.Subtract(this._labelStep.Value);
         }
     }
     else
     {
         if (result.MaxTime == null && this._labelStep != null)
         {
             result.MaxTime = result.MinTime.Value.Add(this._labelStep.Value);
         }
     }
 }
コード例 #2
0
        private DateTimeAxisData CreateAxisData(ChartCollection <ISeries> seriesCollection)
        {
            if (this._minValue == null || this._maxValue == null)
            {
                DateTimeMinAndMaxValue result = this.GetMinAndMaxValue(seriesCollection);
                if (this._minValue != null)
                {
                    result.MinTime = this._minValue.Value;
                }

                if (this._maxValue != null)
                {
                    result.MaxTime = this._maxValue.Value;
                }

                this.CompleteAxisAreaValue(result);
                return(this.CreateDateTimeAxisData(result.MinTime, result.MaxTime));
            }
            else
            {
                return(this.CreateDateTimeAxisData(this._minValue, this._maxValue));
            }
        }