diff --git a/SVGChartBuilder.php b/SVGChartBuilder.php index 7f3dc5c..d2bf19c 100644 --- a/SVGChartBuilder.php +++ b/SVGChartBuilder.php @@ -88,7 +88,7 @@ class SVGChartBuilder { http://vis4.net/blog/posts/doing-the-line-charts-right/ */ $aspectRatio = max(0.25, min(0.75, 1 / $averageAbsSlope)); - $height = $height ?? floor($aspectRatio * $width); + $height = (is_null($height) ? floor($aspectRatio * $width) : $height); function labelFormat($float, $places, $minPlaces = 0) { $value = number_format($float, max($minPlaces, $places));