Ejemplo n.º 1
0
 // TODO 新增属性时需要更新该方法
 public void ApplyConfig(StripChartXCursor template)
 {
     this.AutoInterval   = template.AutoInterval;
     this.Color          = template.Color;
     this.Interval       = template.Interval;
     this.Mode           = template.Mode;
     this.SelectionColor = template.SelectionColor;
 }
Ejemplo n.º 2
0
        internal StripChartXPlotArea(StripChartX parentChart, ChartArea chartArea)
        {
            this._parentChart            = parentChart;
            this.ChartArea               = chartArea;
            this.ChartArea.Position.Auto = false;
            this._enabled = chartArea.Visible;

            this._axisX  = new StripChartXAxis();
            this._axisX2 = new StripChartXAxis();
            this._axisY  = new StripChartXAxis();
            this._axisY2 = new StripChartXAxis();
            _axisX.Initialize(parentChart, this, chartArea.AxisX);
            _axisX.InitAxisViewRange(Constants.DefaultXMax, Constants.DefaultXMin, Constants.DefaultXMax, Constants.DefaultXMin);

            _axisX2.Initialize(parentChart, this, chartArea.AxisX2);
            _axisX2.InitAxisViewRange(Constants.DefaultXMax, Constants.DefaultXMin, Constants.DefaultXMax, Constants.DefaultXMin);

            _axisY.Initialize(parentChart, this, chartArea.AxisY);
            _axisY.InitAxisViewRange(Constants.DefaultYMax, Constants.DefaultYMin, Constants.DefaultYMax, Constants.DefaultYMin);

            _axisY2.Initialize(parentChart, this, chartArea.AxisY2);
            _axisY2.InitAxisViewRange(Constants.DefaultYMax, Constants.DefaultYMin, Constants.DefaultYMax, Constants.DefaultYMin);

            _axes[0] = _axisX;
            _axes[1] = _axisX2;
            _axes[2] = _axisY;
            _axes[3] = _axisY2;

            // Initialize cursor classes
            _xCursor      = new StripChartXCursor(_parentChart, this, chartArea.CursorX, chartArea.AxisX, "X cursor");
            _xCursor.Mode = StripChartXCursor.CursorMode.Zoom;
            _yCursor      = new StripChartXCursor(_parentChart, this, chartArea.CursorY, chartArea.AxisY, "Y cursor");
            _yCursor.Mode = StripChartXCursor.CursorMode.Disabled;
            _cursors[0]   = _xCursor;
            _cursors[1]   = _yCursor;

//            _xAxisSync = new AxisSynchronizer(_axisX, _axisX2);
            YAxisSync = new AxisSynchronizer(_axisY, _axisY2);
        }