Skip to content

Commit

Permalink
fix: only show votes chart if there are any
Browse files Browse the repository at this point in the history
  • Loading branch information
lwestfall committed Jan 7, 2024
1 parent 6ae37ba commit 2f69763
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<canvas
*ngIf="votesChartData"
baseChart
class="chart"
height="300"
[data]="votesChartData"
[options]="votesChartOptions"
type="bar">
</canvas>
@if (bookVotes.length) {
<canvas
*ngIf="votesChartData"
baseChart
class="chart"
height="300"
[data]="votesChartData"
[options]="votesChartOptions"
type="bar">
</canvas>
}
@if (lastBook && ratingChartData) {
<h5 class="display-5 text-center">
Ratings for <i>{{ lastBook.title }}</i>
Expand Down

0 comments on commit 2f69763

Please sign in to comment.