-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve chart by caching progresses, add chart for average step durat…
…ion inside scenario (#211) * Improve chart by caching progresses * Add chart that displays the average duration inside a scenario * fix that clearing scenarios does not work * Rework to use map instead of list * Fix labels to display scenario name * remove logs and fix another label
- Loading branch information
Showing
7 changed files
with
469 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/app/session-statistics/session-time-statistics/session-time-statistics.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<div class="clr-row"> | ||
<div class="clr-col-lg-4 clr-col-md-4 clr-col-12"> | ||
<form | ||
[formGroup]="chartDetails" | ||
[class.clr-error]="chartDetails.errors?.endDateLowerThanStartDate" | ||
> | ||
<clr-select-container> | ||
<label>Scenario</label> | ||
<select clrSelect formControlName="scenario"> | ||
<option | ||
*ngFor="let scenario of scenariosWithSessionMap | keyvalue" | ||
[value]="scenario.key" | ||
> | ||
{{ scenario.value }} | ||
</option> | ||
</select> | ||
</clr-select-container> | ||
</form> | ||
</div> | ||
</div> | ||
<div class="clr-row"> | ||
<div class="clr-col-lg-8 clr-col-md-8 clr-col-12"> | ||
<div style="display: block"> | ||
<canvas | ||
baseChart | ||
[data]="barChartData" | ||
[options]="barChartOptions" | ||
[plugins]="barChartPlugins" | ||
[type]="barChartType" | ||
(chartHover)="chartHovered($event)" | ||
(chartClick)="chartClicked($event)" | ||
> | ||
</canvas> | ||
</div> | ||
</div> | ||
<div class="clr-col-lg-4 clr-col-md-4 clr-col-12"> | ||
<clr-datagrid> | ||
<clr-dg-column [clrDgField]="'key'">Step</clr-dg-column> | ||
<clr-dg-column>Average Duration</clr-dg-column> | ||
<clr-dg-column>Sessions</clr-dg-column> | ||
<clr-dg-row *clrDgItems="let duration of avgDuration; index as i"> | ||
<clr-dg-cell>Step {{ i + 1 }}</clr-dg-cell> | ||
<clr-dg-cell>{{ formatDuration(duration) }}</clr-dg-cell> | ||
<clr-dg-cell>{{ getNumberOfSessionsForStep(i) }}</clr-dg-cell> | ||
</clr-dg-row> | ||
<clr-dg-row> | ||
<clr-dg-cell><b>Total</b></clr-dg-cell> | ||
<clr-dg-cell | ||
><b>{{ formatDuration(totalDuration) }}</b></clr-dg-cell | ||
> | ||
<clr-dg-cell | ||
><b>{{ getNumberOfSessionsForStep(0) }}</b></clr-dg-cell | ||
> | ||
</clr-dg-row> | ||
</clr-datagrid> | ||
</div> | ||
</div> |
Empty file.
Oops, something went wrong.