diff --git a/src/dynamic-map-css.js b/src/dynamic-map-css.js index f7eae34..f57e747 100644 --- a/src/dynamic-map-css.js +++ b/src/dynamic-map-css.js @@ -14,6 +14,13 @@ const getMaxAndMinCountryDataValues = (countryData) => { if (value > max || max === undefined) max = value; }); + // check if min and max is equal + // this happens if the country data is only 1 + if (max === min) { + // set min to zero + min = 0; + } + return { min, max }; };