Skip to content

Commit

Permalink
Fixed a case where large y axis numbers had rounding issues
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Mar 30, 2016
1 parent df2d25e commit 2d97984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Charts/Classes/Renderers/ChartYAxisRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public class ChartYAxisRenderer: ChartAxisRendererBase
}

// Normalize interval
let intervalMagnitude = pow(10.0, round(log10(interval)))
let intervalMagnitude = ChartUtils.roundToNextSignificant(number: pow(10.0, floor(log10(interval))))
let intervalSigDigit = (interval / intervalMagnitude)
if (intervalSigDigit > 5)
{
Expand Down

0 comments on commit 2d97984

Please sign in to comment.