public void Set(IBarLineScatterCandleBubbleDataProvider chart, IBarLineScatterCandleBubbleDataSet dataSet, Animator animator) { var phaseX = Math.Max(0.0, Math.Min(1.0, animator.PhaseX)); var low = chart.LowestVisibleX; var high = chart.HighestVisibleX; var entryFrom = dataSet.EntryForXValue(low, float.NaN, DataSetRounding.Down); Entry entryTo = dataSet.EntryForXValue(high, float.NaN, DataSetRounding.Up); Min = entryFrom == null ? 0 : dataSet.EntryIndex(entryFrom); Max = entryTo == null ? 0 : dataSet.EntryIndex(entryTo); Range = (int)((Max - Min) * phaseX); }
public Bounds(IBarLineScatterCandleBubbleDataProvider chart, IBarLineScatterCandleBubbleDataSet dataSet, Animator animator) { Set(chart, dataSet, animator); }