Esempio n. 1
0
        // TODO 新增属性需要在这里添加代码,后期可以考虑通过接口注解实现
        internal void ApplyConfig(EasyChartXAxis template)
        {
            this.Title            = template.Title;
            this.TitleOrientation = template.TitleOrientation;
            this.TitlePosition    = template.TitlePosition;

            this.AutoScale         = template.AutoScale;
            this.AutoZoomReset     = template.AutoZoomReset;
            this.InitWithScaleView = template.InitWithScaleView;

            this.IsLogarithmic = template.IsLogarithmic;
            this.LabelEnabled  = template.LabelEnabled;
            this.LabelFormat   = template.LabelFormat;

            this.MajorGridEnabled = template.MajorGridEnabled;
            this.MajorGridColor   = template.MajorGridColor;
            this.MajorGridType    = template.MajorGridType;

            this.MinorGridEnabled = template.MinorGridEnabled;
            this.MinorGridColor   = template.MinorGridColor;
            this.MinorGridType    = template.MinorGridType;

            // 需要判断赋值顺序
            double max, min;

            template.GetSpecifiedRange(out max, out min);
            this._specifiedMax = max;
            this._specifiedMin = min;

            template.GetViewRange(out max, out min);
            this._viewMax = max;
            this._viewMin = min;
            this.Color    = template.Color;
        }
 private void SetAxisValue(EasyChartXAxis axis, double max, double min)
 {
     if (max > axis.Minimum)
     {
         axis.Maximum = max;
         axis.Minimum = min;
     }
     else if (min < axis.Maximum)
     {
         axis.Minimum = min;
         axis.Maximum = max;
     }
 }
Esempio n. 3
0
        internal EasyChartXAxis GetAxisByBase(Axis baseAxis)
        {
            string         axisName = baseAxis.Name;
            EasyChartXAxis axis     = null;

            if (AxisX.Name.Equals(axisName))
            {
                axis = AxisX;
            }
            else if (AxisY.Name.Equals(axisName))
            {
                axis = AxisY;
            }
            else if (AxisX2.Name.Equals(axisName))
            {
                axis = AxisX2;
            }
            else if (AxisY2.Name.Equals(axisName))
            {
                axis = AxisY2;
            }
            return(axis);
        }