diff --git a/src/scripts/core.js b/src/scripts/core.js index b568852..4f4428b 100644 --- a/src/scripts/core.js +++ b/src/scripts/core.js @@ -800,7 +800,7 @@ var Chartist = { for (i = bounds.min; i <= bounds.max; i = safeIncrement(i, bounds.step)) { var value = Chartist.roundWithPrecision(i); if (value !== values[values.length - 1]) { - values.push(i); + values.push(value); } } bounds.values = values; diff --git a/test/spec/spec-core.js b/test/spec/spec-core.js index 6195410..4049883 100644 --- a/test/spec/spec-core.js +++ b/test/spec/spec-core.js @@ -421,7 +421,7 @@ describe('Chartist core', function() { expect(bounds.max).toBe(1000); expect(bounds.low).toBe(999.9999999999997); expect(bounds.high).toBe(1000.0000000000001); - expect(bounds.values).toEqual([999.9999999999999]); + expect(bounds.values).toEqual([Chartist.roundWithPrecision(999.9999999999999)]); }); });