add unit type for bytes

This commit is contained in:
2023-03-17 16:53:34 +01:00
parent 686e3edd60
commit 359c17bf29
6 changed files with 150 additions and 31 deletions

View File

@@ -11,11 +11,15 @@
<mat-form-field class="pdb-form-mid">
<mat-label>Y{{yIndex}}-Axis Unit:</mat-label>
<mat-select [(value)]="yAxisUnit">
<mat-optgroup label="numbers">
<mat-optgroup label="numbers">
<mat-option value="AUTOMATIC_NUMBER">auto (number)</mat-option>
<mat-option value="NO_UNIT">no unit</mat-option>
</mat-optgroup>
<mat-optgroup label="⸺time⸺">
<mat-optgroup label="—bytes—">
<mat-option value="AUTOMATIC_BYTES">auto (bytes)</mat-option>
<mat-option value="BYTES">bytes</mat-option>
</mat-optgroup>
<mat-optgroup label="—time—">
<mat-option value="AUTOMATIC_TIME">auto (time)</mat-option>
<mat-option value="MILLISECONDS">millis</mat-option>
<mat-option value="SECONDS">seconds</mat-option>
@@ -25,11 +29,11 @@
</mat-optgroup>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="yAxisUnit !== 'AUTOMATIC_TIME' && yAxisUnit !== 'AUTOMATIC_NUMBER'" class="pdb-form-number">
<mat-form-field *ngIf="yAxisUnit !== 'AUTOMATIC_TIME' && yAxisUnit !== 'AUTOMATIC_NUMBER' && yAxisUnit !== 'AUTOMATIC_BYTES'" class="pdb-form-number">
<mat-label>Min:</mat-label>
<input matInput type="number" placeholder="Min" min="0" [(ngModel)]="minYValue">
</mat-form-field>
<mat-form-field *ngIf="yAxisUnit !== 'AUTOMATIC_TIME' && yAxisUnit !== 'AUTOMATIC_NUMBER'" class="pdb-form-number">
<mat-form-field *ngIf="yAxisUnit !== 'AUTOMATIC_TIME' && yAxisUnit !== 'AUTOMATIC_NUMBER' && yAxisUnit !== 'AUTOMATIC_BYTES'" class="pdb-form-number">
<mat-label>Max:</mat-label>
<input matInput type="number" placeholder="Max" min="0" [(ngModel)]="maxYValue">
</mat-form-field>