public void Initialize(Color color, int markerSize, EasyChartXAxis.PlotAxis xAxis, EasyChartXAxis.PlotAxis yAxis,
                        EasyChartXPlotArea plotArea)
 {
     this._xAxis          = xAxis;
     this._yAxis          = yAxis;
     this._parentPlotArea = plotArea;
     this.Color           = color;
     this.MarkerSize      = markerSize;
     InitializeMoveParameter();
     InitializePaintComponent(color);
 }
 public bool HasSeriesInYAxis(EasyChartXPlotArea plotArea, EasyChartXAxis.PlotAxis plotAxis)
 {
     return(PlotSeries.Any(item => item.ChartArea.Equals(plotArea.Name) && item.YAxisType == (AxisType)plotAxis));
 }
Beispiel #3
0
        internal void Show(IList <double> xValue, IList <double> yValue, Color markerColor, DataMarkerType markerType, EasyChartXAxis.PlotAxis xAxis, EasyChartXAxis.PlotAxis yAxis)
        {
            if (null == xValue || null == yValue || 0 == xValue.Count || 0 == yValue.Count || xValue.Count != yValue.Count)
            {
                throw new ArgumentException("Invalid Marker data.");
            }
            this._shownCount++;
            if (_painters.Count < _shownCount || markerType != _painters[_shownCount - 1].Type)
            {
                MarkerPainter painter = MarkerPainter.CreatePainter(markerType, _adapter, markerColor, _baseChart.Controls);
                while (_painters.Count > _shownCount)
                {
                    _painters.RemoveAt(_painters.Count - 1);
                }
                _painters.Add(painter);
            }
            if (!_isShown)
            {
                _adapter.RefreshPosition();
            }
            int index = _shownCount - 1;

            _painters[index].Initialize(markerColor, MarkerSize, xAxis, yAxis, _parentPlotArea);
            _painters[index].InitializeMarkerControls(xValue, yValue);
            _painters[index].RefreshMarkerPosition();
            this.IsShown = true;
        }