Merge pull request #5321 from pratu16x7/heatmap

handle Math.max() for and empty array
This commit is contained in:
Prateeksha Singh 2018-03-30 13:05:08 +05:30 committed by GitHub
commit cf4b17484a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2895,6 +2895,7 @@ function scale(val, yAxis) {
function calcDistribution(values, distributionSize) {
// Assume non-negative values,
// implying distribution minimum at zero
if(!values.length) values = [0];
var dataMaxValue = Math.max.apply(Math, toConsumableArray(values));