Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ protected function determineHeightForHorizontal(Bar\Bar $component): string
$height = $max_height;
}

return $height . "px";
return (string) (int) $height;
}

protected function determineHeightForVertical(Bar\Bar $component): string
Expand All @@ -149,7 +149,7 @@ protected function determineHeightForVertical(Bar\Bar $component): string
$height = $max_height;
}

return $height . "px";
return (string) (int) $height;
}

protected function getAccessibilityList(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public function testRenderHorizontal(): void

$expected_html = <<<EOT
<div class="il-chart-bar-horizontal">
<canvas id="id_1" height="150px" aria-label="bar123" role="img"></canvas>
<canvas id="id_1" height="150" aria-label="bar123" role="img"></canvas>
</div>
<div class="sr-only">
<dl>
Expand Down Expand Up @@ -378,7 +378,7 @@ public function testRenderVertical(): void

$expected_html = <<<EOT
<div class="il-chart-bar-vertical">
<canvas id="id_1" height="165px" aria-label="bar123" role="img"></canvas>
<canvas id="id_1" height="165" aria-label="bar123" role="img"></canvas>
</div>
<div class="sr-only">
<dl>
Expand Down