Skip to content

Commit

Permalink
fix: stacked bar
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio committed Dec 1, 2024
1 parent 09269e5 commit 7d4c54d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/views/components/stacked-bar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
<x-legend
:image="data_get($item, 'image')"
:label="$item['name']"
:description="sprintf('%s (%s)', Number::percentage($item['percent'], 2), Number::format($item['votes']))"
:description="sprintf(
'%s (%s)',
Number::percentage(data_get($item, 'percent', 0), 2),
Number::format(data_get($item, 'votes', 0)),
)"
:color="$item['color']" />
@endforeach
</ul>
Expand Down

0 comments on commit 7d4c54d

Please sign in to comment.