diff --git a/lib/music_library_web/components/chart_components.ex b/lib/music_library_web/components/chart_components.ex index b6b9f8f3..8d1bfe24 100644 --- a/lib/music_library_web/components/chart_components.ex +++ b/lib/music_library_web/components/chart_components.ex @@ -89,7 +89,7 @@ defmodule MusicLibraryWeb.ChartComponents do defp calculate_bar_height(data, available_height) do bar_count = length(data) - max_height = min(30, (available_height - (bar_count - 1) * 4) / bar_count) + max_height = min(15, (available_height - (bar_count - 1) * 4) / bar_count) max(20, max_height) |> trunc() end diff --git a/lib/music_library_web/live/stats_live/index.html.heex b/lib/music_library_web/live/stats_live/index.html.heex index 01247ab5..1c6d1474 100644 --- a/lib/music_library_web/live/stats_live/index.html.heex +++ b/lib/music_library_web/live/stats_live/index.html.heex @@ -489,7 +489,7 @@ <.vertical_bar_chart data={@records_by_artist} width={600} - height={35 * length(@records_by_artist)} + height={26 * length(@records_by_artist)} color_class="fill-red-500" label_fn={fn datum -> datum.name end} value_fn={fn datum -> datum.count end} @@ -511,7 +511,7 @@ <.vertical_bar_chart data={@records_by_genre} width={600} - height={35 * length(@records_by_genre)} + height={26 * length(@records_by_genre)} color_class="fill-zinc-500" label_fn={fn {genre, _count} -> genre end} value_fn={fn {_genre, count} -> count end}