Skip to content

Commit

Permalink
captions added
Browse files Browse the repository at this point in the history
  • Loading branch information
second-slip committed Aug 4, 2024
1 parent b732374 commit 015bb3f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/app/innings-bar/innings-bar.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@if (loaded()) {
<h4 class="centre">Match innings analysis</h4>

<p class="centre">Better at the start? Performance by match innings.</p>

<canvas class="chart" baseChart [type]="'bar'" [legend]="true" [datasets]="wicketsData.datasets"
[labels]="wicketsData.labels" [options]="barChartOptions" [plugins]="chartPlugins">
</canvas>
Expand Down
4 changes: 3 additions & 1 deletion src/app/year-bar/year-bar.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@if (loaded()) {
<h4 class="centre">Year by year</h4>
<h4 class="centre">Years and years</h4>

<p class="centre">22 years of Test cricket: performance by year.</p>

<canvas class="chart" baseChart [type]="'bar'" [legend]="true" [datasets]="wicketsData.datasets"
[labels]="wicketsData.labels" [options]="barChartOptions">
Expand Down
2 changes: 1 addition & 1 deletion src/app/year-bar/year-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class YearBarComponent {
.subscribe({
next: (data: IChartData) => {
this.wicketsData.labels = data.chartLabels,
this.wicketsData.datasets[0].data = data.chartData[0],
this.wicketsData.datasets[0].data = data.chartData[0],
this.wicketsData.datasets[1].data = data.chartData[1],
this.wicketsData.datasets[2].data = data.chartData[2]
},
Expand Down

0 comments on commit 015bb3f

Please sign in to comment.