public override double GetClusterSize(XYSeriesPresenter presenter) { this.EnsureAxisMargins(); double num = 0.0; if (this.SeriesMarginInfos.ContainsKey(presenter.Series.ClusterKey)) { num = this.SeriesMarginInfos[presenter.Series.ClusterKey].Start; } if (num == 0.0 && this.Axis.IsMarginVisible != AutoBool.True) { num = presenter.GetSeriesMarginInfo(AutoBool.True).Start; } if (num > 0.0) { return(Math.Abs(this.ConvertScaleToAxisUnits(num, this.ActualLength) - this.ConvertScaleToAxisUnits(2.0 * num, this.ActualLength))); } return(0.0); }
internal virtual void OnAxisScaleChanged(object sender, EventArgs e) { Axis axis = sender as Axis; this.UpdateSession.BeginUpdates(); foreach (XYSeries xySeries in this.Series) { XYSeriesPresenter presenter = (XYSeriesPresenter)xySeries.SeriesPresenter; Action action = (Action)null; if (axis == xySeries.XAxis) { action = (Action)(() => presenter.OnXScaleChanged()); } else if (axis == xySeries.YAxis) { action = (Action)(() => presenter.OnYScaleChanged()); } if (action != null) { if (this.ChartAreaPanel != null && this.ChartAreaPanel.IsDirty) { XYChartArea.SeriesAxisKey key = new XYChartArea.SeriesAxisKey() { Series = (Semantic.Reporting.Windows.Chart.Internal.Series)xySeries, Axis = axis }; if (EnumerableFunctions.FindIndexOf <Tuple <object, Action> >((IEnumerable <Tuple <object, Action> >) this._updateActions, (Func <Tuple <object, Action>, bool>)(t => key.Equals(t.Item1))) == -1) { this._updateActions.Enqueue(new Tuple <object, Action>((object)key, action)); } } else { action(); } } } this.UpdateSession.EndUpdates(); }
public abstract double GetClusterSize(XYSeriesPresenter presetner);
public override double GetClusterSize(XYSeriesPresenter presenter) { this.EnsureAxisMargins(); double num = 0.0; if (this.SeriesMarginInfos.ContainsKey(presenter.Series.ClusterKey)) num = this.SeriesMarginInfos[presenter.Series.ClusterKey].Start; if (num == 0.0 && this.Axis.IsMarginVisible != AutoBool.True) num = presenter.GetSeriesMarginInfo(AutoBool.True).Start; if (num > 0.0) return Math.Abs(this.ConvertScaleToAxisUnits(num, this.ActualLength) - this.ConvertScaleToAxisUnits(2.0 * num, this.ActualLength)); return 0.0; }