public DimensinalBounds GetBounds(PieChart <TDrawingContext> chart) { var stack = chart.SeriesContext.GetStackPosition(this, GetStackGroup()); if (stack == null) { throw new NullReferenceException("Unexpected null stacker"); } var bounds = new DimensinalBounds(); foreach (var point in Fetch(chart)) { stack.StackPoint(point); bounds.PrimaryBounds.AppendValue(point.PrimaryValue); bounds.SecondaryBounds.AppendValue(point.SecondaryValue); bounds.TertiaryBounds.AppendValue(PushOut); } return(bounds); }
/// <inheritdoc/> public virtual DimensinalBounds GetBounds( CartesianChart <TDrawingContext> chart, IAxis <TDrawingContext> x, IAxis <TDrawingContext> y) { var stack = chart.SeriesContext.GetStackPosition(this, GetStackGroup()); var bounds = new DimensinalBounds(); foreach (var point in Fetch(chart)) { var secondary = point.SecondaryValue; var primary = point.PrimaryValue; if (stack != null) { primary = stack.StackPoint(point); } bounds.PrimaryBounds.AppendValue(primary); bounds.SecondaryBounds.AppendValue(secondary); } return(bounds); }
/// <inheritdoc/> public virtual DimensinalBounds GetBounds( CartesianChart <TDrawingContext> chart, IAxis <TDrawingContext> x, IAxis <TDrawingContext> y) { var stack = chart.SeriesContext.GetStackPosition(this, GetStackGroup()); var bounds = new DimensinalBounds(); foreach (var point in Fetch(chart)) { var primary = point.PrimaryValue; var secondary = point.SecondaryValue; // it has more sense to override this method and call the stack, only if the series requires so. if (stack != null) { primary = stack.StackPoint(point); } bounds.PrimaryBounds.AppendValue(primary); bounds.SecondaryBounds.AppendValue(secondary); } return(bounds); }