Skip to content

Commit

Permalink
fix ChartsOrg#940 fix all data set calcMinMax
Browse files Browse the repository at this point in the history
start may less than endValue
  • Loading branch information
liuxuan30 committed Apr 12, 2016
1 parent 9f19195 commit 2ab382e
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public class BarChartDataSet: BarLineScatterCandleBubbleChartDataSet, IBarChartD
_yMin = DBL_MAX
_yMax = -DBL_MAX

for i in start ... endValue
for i in start.stride(through: endValue, by: 1)
{
if let e = _yVals[i] as? BarChartDataEntry
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class BubbleChartDataSet: BarLineScatterCandleBubbleChartDataSet, IBubble
_yMin = yMin(entries[start])
_yMax = yMax(entries[start])

for i in start ... endValue
for i in start.stride(through: endValue, by: 1)
{
let entry = entries[i]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class CandleChartDataSet: LineScatterCandleRadarChartDataSet, ICandleChar
_yMin = DBL_MAX
_yMax = -DBL_MAX

for i in start ... endValue
for i in start.stride(through: endValue, by: 1)
{
let e = entries[i]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public class ChartDataSet: ChartBaseDataSet
_yMin = DBL_MAX
_yMax = -DBL_MAX

for i in start ... endValue
for i in start.stride(through: endValue, by: 1)
{
let e = _yVals[i]

Expand Down
2 changes: 1 addition & 1 deletion ChartsRealm/Classes/Data/RealmBarDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public class RealmBarDataSet: RealmBarLineScatterCandleBubbleDataSet, IBarChartD
_yMin = DBL_MAX
_yMax = -DBL_MAX

for i in start ... endValue
for i in start.stride(through: endValue, by: 1)
{
if let e = _cache[i - _cacheFirst] as? BarChartDataEntry
{
Expand Down
2 changes: 1 addition & 1 deletion ChartsRealm/Classes/Data/RealmBaseDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public class RealmBaseDataSet: ChartBaseDataSet
_yMin = DBL_MAX
_yMax = -DBL_MAX

for i in start ... endValue
for i in start.stride(through: endValue, by: 1)
{
let e = _cache[i - _cacheFirst]

Expand Down
2 changes: 1 addition & 1 deletion ChartsRealm/Classes/Data/RealmBubbleDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public class RealmBubbleDataSet: RealmBarLineScatterCandleBubbleDataSet, IBubble
_yMin = yMin(_cache[start - _cacheFirst] as! BubbleChartDataEntry)
_yMax = yMax(_cache[start - _cacheFirst] as! BubbleChartDataEntry)

for i in start ... endValue
for i in start.stride(through: endValue, by: 1)
{
let entry = _cache[i - _cacheFirst] as! BubbleChartDataEntry

Expand Down
2 changes: 1 addition & 1 deletion ChartsRealm/Classes/Data/RealmCandleDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public class RealmCandleDataSet: RealmLineScatterCandleRadarDataSet, ICandleChar
_yMin = DBL_MAX
_yMax = -DBL_MAX

for i in start ... endValue
for i in start.stride(through: endValue, by: 1)
{
let e = _cache[i - _cacheFirst] as! CandleChartDataEntry

Expand Down

0 comments on commit 2ab382e

Please sign in to comment.