private void PrepareBubbles() { if (!View.Series.Any(x => x is IBubbleSeriesView)) { return; } var vs = View.Series.Select(x => x.Values.Limit3).ToArray(); Value3CoreLimit = new CoreLimit(vs.Select(x => x.Min).DefaultIfEmpty(0).Min(), vs.Select(x => x.Max).DefaultIfEmpty(0).Max()); }
private void PrepareWeight() { if (!ActualSeries.Any(x => x is IBubbleSeriesView || x is IHeatSeries)) { return; } var vs = ActualSeries.Select(x => x.ActualValues.Limit3).ToArray(); Value3CoreLimit = new CoreLimit(vs.Select(x => x.Min).DefaultIfEmpty(0).Min(), vs.Select(x => x.Max).DefaultIfEmpty(0).Max()); }
private void PrepareWeight() { if (!View.ActualSeries.Any(x => x is IScatterSeriesView || x is IHeatSeriesView)) { return; } var vs = View.ActualSeries .Select(x => x.ActualValues.GetTracker(x).WLimit) .DefaultIfEmpty(new CoreLimit()).ToArray(); WLimit = new CoreLimit(vs.Select(x => x.Min).DefaultIfEmpty(0).Min(), vs.Select(x => x.Max).DefaultIfEmpty(0).Max()); }
private static void SetAxisLimits(AxisCore ax, IList <ICartesianSeries> series, AxisOrientation orientation) { var first = new CoreLimit(); var firstR = 0d; if (series.Count > 0) { first = orientation == AxisOrientation.X ? new CoreLimit(series[0].GetMinX(ax), series[0].GetMaxX(ax)) : new CoreLimit(series[0].GetMinY(ax), series[0].GetMaxY(ax)); var view = series[0].View as IAreaPoint; firstR = view != null?view.GetPointDiameter() : 0; } // [ max, min, pointRadius ] var boundries = new[] { first.Max, first.Min, firstR }; for (var index = 1; index < series.Count; index++) { var cartesianSeries = series[index]; var limit = orientation == AxisOrientation.X ? new CoreLimit(cartesianSeries.GetMinX(ax), cartesianSeries.GetMaxX(ax)) : new CoreLimit(cartesianSeries.GetMinY(ax), cartesianSeries.GetMaxY(ax)); var view = cartesianSeries.View as IAreaPoint; var radius = view != null?view.GetPointDiameter() : 0; if (limit.Max > boundries[0]) { boundries[0] = limit.Max; } if (limit.Min < boundries[1]) { boundries[1] = limit.Min; } if (radius > boundries[2]) { boundries[2] = radius; } } ax.TopSeriesLimit = boundries[0]; ax.BotSeriesLimit = boundries[1]; ax.TopLimit = double.IsNaN(ax.MaxValue) ? boundries[0] : ax.MaxValue; ax.BotLimit = double.IsNaN(ax.MinValue) ? boundries[1] : ax.MinValue; ax.MaxPointRadius = boundries[2]; }
private static void SetAxisLimits(AxisCore ax, IList <ISeriesView> series, AxisOrientation orientation) { var first = new CoreLimit(); var firstR = 0d; if (series.Count > 0) { first = orientation == AxisOrientation.X ? series[0].Values.GetTracker(series[0]).XLimit : series[0].Values.GetTracker(series[0]).YLimit; var view = series[0] as IAreaPoint; firstR = view != null?view.GetPointDiameter() : 0; } // [ max, min, pointRadius ] var boundries = new[] { first.Max, first.Min, firstR }; for (var index = 1; index < series.Count; index++) { var seriesView = series[index]; var tracker = seriesView.Values.GetTracker(seriesView); var limit = orientation == AxisOrientation.X ? tracker.XLimit : tracker.YLimit; var view = seriesView as IAreaPoint; var radius = view != null?view.GetPointDiameter() : 0; if (limit.Max > boundries[0]) { boundries[0] = limit.Max; } if (limit.Min < boundries[1]) { boundries[1] = limit.Min; } if (radius > boundries[2]) { boundries[2] = radius; } } ax.TopSeriesLimit = boundries[0]; ax.BotSeriesLimit = boundries[1]; ax.TopLimit = double.IsNaN(ax.MaxValue) ? boundries[0] : ax.MaxValue; ax.BotLimit = double.IsNaN(ax.MinValue) ? boundries[1] : ax.MinValue; ax.MaxPointRadius = boundries[2]; }