mirror of
https://github.com/seigler/neat-charts
synced 2025-07-27 09:26:10 +00:00
avoid coalesce operator
This commit is contained in:
parent
29a36eb63f
commit
4d2ddab9c2
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ class SVGChartBuilder {
|
||||||
http://vis4.net/blog/posts/doing-the-line-charts-right/
|
http://vis4.net/blog/posts/doing-the-line-charts-right/
|
||||||
*/
|
*/
|
||||||
$aspectRatio = max(0.25, min(0.75, 1 / $averageAbsSlope));
|
$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) {
|
function labelFormat($float, $places, $minPlaces = 0) {
|
||||||
$value = number_format($float, max($minPlaces, $places));
|
$value = number_format($float, max($minPlaces, $places));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue