Ejemplo n.º 1
0
 // TODO 新增属性时需要更新该方法
 public void ApplyConfig(EasyChartXCursor 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 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);
        }