private void HideMarkerValue(object sender, EventArgs eventArgs)
        {
            MarkerControl markerControl = sender as MarkerControl;
            EasyChartX    parentChart   = markerControl.Parent.Parent as EasyChartX;

            parentChart.ShowMarkerValue(string.Format(string.Empty), Point.Empty, false);
        }
        private void SetFormLocation(EasyChartX parentChart)
        {
            Control currentControl = parentChart;
            int     chartAbsoluteX = parentChart.Location.X;
            int     chartAbsoluteY = parentChart.Location.X;

            while (null != currentControl.Parent)
            {
                currentControl  = currentControl.Parent;
                chartAbsoluteX += currentControl.Location.X;
                chartAbsoluteY += currentControl.Location.Y;
            }
            int       formPositionX = chartAbsoluteX + parentChart.Width - this.Width / 2;
            int       formPositionY = chartAbsoluteY + parentChart.Height - this.Height;
            Rectangle workingArea   = Screen.GetWorkingArea(this);

            if (formPositionX + this.Width > workingArea.Width + workingArea.X)
            {
                formPositionX = workingArea.Width + workingArea.X - this.Width;
            }
            else if (formPositionX < 0)
            {
                formPositionX = 0;
            }

            if (formPositionY + this.Height > workingArea.Height + workingArea.Y)
            {
                formPositionY = workingArea.Height + workingArea.Y - this.Height;
            }
            else if (formPositionY < 0)
            {
                formPositionY = 0;
            }
            this.Location = new Point(formPositionX, formPositionY);
        }
Example #3
0
        internal MiscellaneousConfiguration(EasyChartX parentChart, ChartViewManager viewManager, PlotManager plotManager,
                                            DataMarkerManager markerManager)
        {
            this._parentChart   = parentChart;
            this._plotManager   = plotManager;
            this._viewManager   = viewManager;
            this._markerManager = markerManager;

            this.ShowFunctionMenu = true;
        }
Example #4
0
        internal ChartViewManager(EasyChartX parentChart, Chart plotChart, PlotManager plotManager)
        {
            this._parentChart = parentChart;
            this._plotChart   = plotChart;
            this._plotManager = plotManager;
            this.MainPlotArea = new EasyChartXPlotArea(parentChart, plotChart.ChartAreas[0]);
            this.MainPlotArea.ChartArea.Position.Auto = true;
            this._sortDirection    = EasyChartXSortDirection.LeftToRight;
            this.UseMainAreaConfig = true;

            this.SplitPlotAreas = new EasyChartXPlotAreaCollection(parentChart, plotChart.ChartAreas);
            AdaptView();
        }
        private void ShowMarkerValue(object sender, EventArgs eventArgs)
        {
            MarkerControl markerControl = sender as MarkerControl;
            EasyChartX    parentChart   = markerControl.Parent.Parent as EasyChartX;
            Point         tipLocation   = markerControl.Location;

            tipLocation.X += MarkerSize;
            tipLocation.Y += MarkerSize;
            const string markerValueFormat = "X:{0}{1}Y:{2}";

            parentChart.ShowMarkerValue(string.Format(markerValueFormat, markerControl.XValue,
                                                      Environment.NewLine, markerControl.YValue), tipLocation, true);
        }
        public TabCursorInfoForm(EasyChartX parentChart)
        {
            InitializeComponent();
            this._cursors     = parentChart.TabCursors;
            this._parentChart = parentChart;
            RefreshCursorInfo();
            SetFormLocation(parentChart);
            const string formNameFormat = "{0} Tab Cursors";

            this.Text = string.Format(formNameFormat, parentChart.Name);
            this._isInternalOperation = false;

            this._parentChart.TabCursorChanged += RefreshCursorValue;
        }
Example #7
0
        internal PlotManager(EasyChartX easyChart, SeriesCollection plotSeries, EasyChartXSeriesCollection lineSeries)
        {
            this._fitType = EasyChartX.FitType.Range;

            this.IsPlotting       = false;
            this._easyChart       = easyChart;
            this.CumulativePlot   = false;
            this._plotSeriesCount = 1;

            this.PlotSeries       = plotSeries;
            this._plotSeriesCount = PlotSeries.Count;
            this._lineSeries      = lineSeries;
            this.PlotDatas        = new List <DataEntity>(Constants.MaxPointsInSingleSeries);

            this.DataCheckParams = new DataCheckParameters();
        }
Example #8
0
        internal DataMarkerManager(EasyChartX parentChart, Chart baseChart, EasyChartXPlotArea parentPlotArea)
        {
            this._parentChart    = parentChart;
            this._parentPlotArea = parentPlotArea;
            this._baseChart      = baseChart;
            this._adapter        = new PositionAdapter(baseChart, parentPlotArea);

            const int defaultMarkerSeries = 4;

            this._painters = new List <MarkerPainter>(defaultMarkerSeries);

            this._markerSize = 7;

            this._shownCount = 0;

            this._isShown = false;
            this._enabled = true;
            RefreshChartPaintEvent();
        }
        internal PlotManager(EasyChartX parentChart, SeriesCollection plotSeries)
        {
            // LineSeries只是一个用于维护对外接口的属性
            this._fitType = EasyChartX.FitType.Range;

            this.IsPlotting       = false;
            this._parentChart     = parentChart;
            this.CumulativePlot   = false;
            this._plotSeriesCount = 1;

            this.PlotSeries       = plotSeries;
            this._plotSeriesCount = PlotSeries.Count;

            this._series = new EasyChartXSeriesCollection(plotSeries, parentChart);
            LineSeries   = new EasyChartXLineSeries(_series);

            this.PlotDatas       = new List <DataEntity>(Constants.MaxPointsInSingleSeries);
            this.DataCheckParams = new DataCheckParameters();

            this.MaxSeriesCount = Constants.DefaultMaxSeriesCount;
        }
Example #10
0
        /// <summary>
        /// TabCursor infomation form
        /// </summary>
        public TabCursorInfoForm(EasyChartX parentChart)
        {
            InitializeComponent();
            this._cursors     = parentChart.TabCursors;
            this._parentChart = parentChart;
            RefreshCursorInfo();
            SetFormLocation(parentChart);
            const string formNameFormat = "{0} Tab Cursors";

            this.Text = string.Format(formNameFormat, parentChart.Name);
            this._isInternalOperation = false;

            RefreshSeriesNames();
            this._parentChart.TabCursorChanged += RefreshCursorValue;
            this._parentChart.AfterPlot        += RefreshCursorYValue;
            // RunTimeEditable为false时,tabCursor的添加删除按钮不使能
            if (!parentChart.TabCursors.RunTimeEditable)
            {
                tableLayoutPanel_buttonPanel.Enabled = false;
            }
        }
Example #11
0
 public abstract void ConfigChart(EasyChartX chart);
Example #12
0
 public override void ConfigChart(EasyChartX chart)
 {
 }
Example #13
0
 public override void ConfigChart(EasyChartX chart)
 {
     chart.AxisX.InitWithScaleView = true;
     chart.AxisX.ViewMaximum       = 10000;
     chart.AxisX.ViewMinimum       = 0;
 }