Esempio n. 1
0
        // TODO 暂时只开发Y轴和Y2轴的同步,X轴的后期再加
        internal void AdaptSecondaryAxes(double maxXValue, double minXValue, double maxYValue, double minYValue)
        {
            YAxisSync.InitSyncParam(maxYValue, minYValue);
            YAxisSync.SyncAxis();

//            _axisX2.RefreshXLabelFormat();
            _axisY2.RefreshYMajorGridInterval();
        }
Esempio n. 2
0
        // TODO to check if axis view event triggered in Reset
        internal void AdaptPrimaryAxes(double maxXValue, double minXValue, double maxYValue, double minYValue)
        {
            double lastMaxX = AxisX.Maximum;
            double lastMinX = AxisX.Minimum;
            double lastMaxY = AxisY.Maximum;
            double lastMinY = AxisY.Minimum;

            _axisX.SetXAxisRangeValue(maxXValue, minXValue);
            _axisX.RefreshAxisRange();

            _axisY.SetYAxisRangeValue(maxYValue, minYValue);
            _axisY.RefreshAxisRange();

            CancelScaleViewIfRangeNotFit(lastMaxX, lastMinX, lastMaxY, lastMinY);

            if (_axisX.AutoZoomReset)
            {
                _axisX.CancelScaleView();
            }
            else if (!_axisX.IsZoomed)
            {
                _axisX.ResetAxisScaleView();
            }

            if (_axisY.AutoZoomReset)
            {
                _axisY.CancelScaleView();
            }
            else if (!_axisY.IsZoomed)
            {
                _axisY.ResetAxisScaleView();
            }

            _axisX.RefreshXLabelFormat();
            _axisY.RefreshYMajorGridInterval();
        }