Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        internal EasyChartXPlotArea(EasyChartX parentChart, ChartArea chartArea)
        {
            this._parentChart            = parentChart;
            this.ChartArea               = chartArea;
            this.ChartArea.Position.Auto = false;
            this._enabled = chartArea.Visible;

            this._axisX  = new EasyChartXAxis();
            this._axisX2 = new EasyChartXAxis();
            this._axisY  = new EasyChartXAxis();
            this._axisY2 = new EasyChartXAxis();
            _axisX.Initialize(parentChart, this, chartArea.AxisX);
            _axisX.InitAxisViewRange(1000, 0, 1000, 0);

            _axisX2.Initialize(parentChart, this, chartArea.AxisX2);
            _axisX2.InitAxisViewRange(1000, 0, 1000, 0);

            _axisY.Initialize(parentChart, this, chartArea.AxisY);
            _axisY.InitAxisViewRange(3.5, 0, 3.5, 0);

            _axisY2.Initialize(parentChart, this, chartArea.AxisY2);
            _axisY2.InitAxisViewRange(3.5, 0, 3.5, 0);

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

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

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