//The constructor associates the control with the smart tag list.
        public EasyChartXActionList(IComponent component)
            : base(component)
        {
            this.colUserControl = component as EasyChartX;

            this.designerActionUISvc = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
        }
 public EasyChartXPropertyForm(EasyChartX _ctrl)
 {
     InitializeComponent();
     _beforeCtrl       = ControlFactory.CloneCtrl(_ctrl);
     _changedCtrl      = _ctrl;
     windowCloseButton = false;
 }
        private void CancelConfigure()
        {
            EasyChartX beforeEasyChart = ((EasyChartX)_beforeCtrl);

            _changedCtrl.Size = beforeEasyChart.Size;

            _changedCtrl.LegendVisible = beforeEasyChart.LegendVisible;
            _changedCtrl.YAutoEnable   = beforeEasyChart.YAutoEnable;
            double yAxisRange = beforeEasyChart.AxisY.Maximum;

            if (!double.IsNaN(yAxisRange))
            {
                _changedCtrl.AxisY.Maximum = (int)yAxisRange;
            }
            yAxisRange = beforeEasyChart.AxisY.Minimum;
            if (!double.IsNaN(yAxisRange))
            {
                _changedCtrl.AxisY.Minimum = (int)yAxisRange;
            }

            _changedCtrl.BackColor          = beforeEasyChart.BackColor;
            _changedCtrl.ChartAreaBackColor = beforeEasyChart.ChartAreaBackColor;
            _changedCtrl.LegendBackColor    = beforeEasyChart.LegendBackColor;
            _changedCtrl.GradientStyle      = beforeEasyChart.GradientStyle;
//            _changedCtrl.XAxisLogarithmic = beforeEasyChart.XAxisLogarithmic;
//            _changedCtrl.YAxisLogarithmic = beforeEasyChart.YAxisLogarithmic;
        }
示例#4
0
        //        private bool _isUserChangedView = false;

        #region Constrctor

        internal EasyChartXCursor(EasyChartX baseEasyChart, EasyChartXPlotArea basePlotArea, Cursor baseCursor, Axis baseAxis, string cursorName)
        {
            this._baseEasyChart = baseEasyChart;
            this._basePlotArea  = basePlotArea;
            this._baseCursor    = baseCursor;
            this._baseAxis      = baseAxis;
            this.Name           = cursorName;
        }
示例#5
0
        //        private bool _isUserChangedView = false;

        #region Constrctor

        internal EasyChartXCursor(EasyChartX parentChart, EasyChartXPlotArea parentPlotArea, Cursor baseCursor, Axis baseAxis, string cursorName)
        {
            this._parentChart    = parentChart;
            this._parentPlotArea = parentPlotArea;
            this._baseCursor     = baseCursor;
            this._baseAxis       = baseAxis;
            this.Name            = cursorName;
        }
示例#6
0
 /// <summary>
 /// Constructor for design
 /// </summary>
 public EasyChartXAxis()
 {
     this._parentChart      = null;
     this._baseAxis         = null;
     this._autoScale        = true;
     this.AutoZoomReset     = false;
     this.InitWithScaleView = false;
     this.IsLogScaleView    = false;
 }
示例#7
0
 /// <summary>
 /// Constructor for design
 /// </summary>
 public EasyChartXAxis()
 {
     this._baseEasyChart    = null;
     this._baseAxis         = null;
     this._autoScale        = true;
     this.AutoZoomReset     = false;
     this.InitWithScaleView = false;
     this.Maximum           = double.NaN;
     this.Minimum           = double.NaN;
     this.ViewMaximum       = double.NaN;
     this.ViewMinimum       = double.NaN;
 }
示例#8
0
        internal TabCursorCollection(EasyChartX parentChart, Chart baseChart, EasyChartXPlotArea plotArea)
        {
            this._parentChart      = parentChart;
            this._plotArea         = plotArea;
            this._baseChart        = baseChart;
            this._adapter          = new PositionAdapter(baseChart, plotArea);
            this._cursors          = new List <TabCursor>(MaxCursorCount);
            this.CursorValueFormat = null;

            _flowCursorEnableFlag = false;
//            this._baseChart.PostPaint += BaseChartOnPostPaint;
            // TODO to add _cursor code, get from parentchart
        }
示例#9
0
        internal void Initialize(EasyChartX baseEasyChart, EasyChartXPlotArea basePlotArea, Axis baseAxis)
        {
            this.Name           = baseAxis.Name;
            this._baseEasyChart = baseEasyChart;
            this._basePlotArea  = basePlotArea;
            this._baseAxis      = baseAxis;

            this._specifiedMax = baseAxis.Maximum;
            this._specifiedMin = baseAxis.Minimum;

            this._viewMax = baseAxis.ScaleView.ViewMaximum;
            this._viewMin = baseAxis.ScaleView.ViewMinimum;

            SetAxisLabelStyle();
        }
 internal EasyChartXSeriesCollection(SeriesCollection chartSeries, EasyChartX parentChart)
 {
     this._plotSeries  = chartSeries;
     _lineSeries       = new List <EasyChartXSeries>(Constants.DefaultMaxSeriesCount);
     this._parentChart = parentChart;
     // 默认添加n个Series
     foreach (Series plotSeries in _plotSeries)
     {
         EasyChartXSeries series = new EasyChartXSeries();
         series.SetSeriesCollecton(this);
         series.Name = plotSeries.Name;
         series.AdaptBaseSeries(plotSeries);
         // 为了判断是否为设计时,只能使用原集合的Add
         _lineSeries.Add(series);
     }
 }
示例#11
0
        internal void Initialize(EasyChartX baseEasyChart, EasyChartXPlotArea basePlotArea, Axis baseAxis)
        {
            this.Name            = baseAxis.Name;
            this._parentChart    = baseEasyChart;
            this._parentPlotArea = basePlotArea;
            this._baseAxis       = baseAxis;

            this._viewMax = baseAxis.ScaleView.ViewMaximum;
            this._viewMin = baseAxis.ScaleView.ViewMinimum;

            if (IsXAxis())
            {
                this._maxData        = Constants.DefaultXMax;
                this._minData        = IsLogarithmic ? Constants.DefaultMinLogarithmic : Constants.DefaultXMin;
                this._specifiedMax   = _maxData;
                this._specifiedMin   = _minData;
                this.ViewMaximum     = Constants.DefaultXMax;
                this.ViewMinimum     = _minData;
                this._majorGridCount = -1;
            }
            else
            {
                this._maxData        = Constants.DefaultYMax;
                this._minData        = IsLogarithmic ? Constants.DefaultMinLogarithmic :Constants.DefaultYMin;
                this._specifiedMax   = _maxData;
                this._specifiedMin   = _minData;
                this.ViewMaximum     = _maxData;
                this.ViewMinimum     = _minData;
                this._majorGridCount = Constants.DefaultYMajorGridCount;
            }
            RefreshAxisRange();
            if (IsYAxis())
            {
                RefreshYMajorGridInterval();
            }
            SetAxisLabelStyle();
            // 设置主网格默认为虚线
            this.MajorGridType = GridStyle.Dash;
            this.MinorGridType = GridStyle.DashDot;
        }
示例#12
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);
        }
 public EasyChartXPlotAreaCollection(EasyChartX baseEasyChart, ChartAreaCollection chartAreas)
 {
     this._baseEasyChart = baseEasyChart;
     this._chartAreas    = chartAreas;
 }
示例#14
0
 public EasyChartXPlotAreaCollection(EasyChartX parentChart, ChartAreaCollection chartAreas)
 {
     this._parentChart = parentChart;
     this._chartAreas  = chartAreas;
 }