* The radialLinear grid indexable and scriptable options don't decrease the index of the specified grid line anymore.
* The `destroy` plugin hook has been removed and replaced with `afterDestroy`.
* Ticks callback on time scale now receives timestamp instead of a formatted label.
+* Linear scales now add and subtracts `5%` of the max value to the range if the min and max are the same instead of `1`.
* If the tooltip callback returns `undefined`, then the default callback will be used.
#### Type changes
}
if (min === max) {
- let offset = 1;
- if (max >= Number.MAX_SAFE_INTEGER || min <= Number.MIN_SAFE_INTEGER) {
- // In this case, the magnitude of the number is so large that
- // max === max + 1 due to how IEEE754 doubles work. We need to increase
- // the range by a larger number. Let's be safe and make this 5% of the number
- //
- // TODO - V4, make this the new default behaviour and eliminate +1 in other cases
- offset = Math.abs(max * 0.05);
- }
+ let offset = max === 0 ? 1 : Math.abs(max * 0.05);
setMax(max + offset);