rename y-axis-range component to y-axis-definition

This commit is contained in:
2020-02-08 12:50:23 +01:00
parent b59b49f2d1
commit 4dc41faeae
8 changed files with 31 additions and 31 deletions

View File

@@ -0,0 +1,19 @@
<div>
<mat-form-field class="pdb-form-mid">
<mat-label>Y-Axis Range:</mat-label>
<mat-select [(value)]="yAxisUnit">
<mat-option value="AUTOMATIC">automatic</mat-option>
<mat-option value="MILLISECONDS">millis</mat-option>
<mat-option value="SECONDS">seconds</mat-option>
<mat-option value="MINUTES">minutes</mat-option>
<mat-option value="HOURS">hours</mat-option>
<mat-option value="DAYS">days</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="yAxisUnit !== 'AUTOMATIC'" class="pdb-form-number">
<input matInput type="number" placeholder="Min" min="0" [(ngModel)]="minYValue">
</mat-form-field>
<mat-form-field *ngIf="yAxisUnit !== 'AUTOMATIC'" class="pdb-form-number">
<input matInput type="number" placeholder="Max" min="0" [(ngModel)]="maxYValue">
</mat-form-field>
</div>

View File

@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { YAxisDefinitionComponent } from './y-axis-definition.component';
describe('YAxisDefinitionComponent', () => {
let component: YAxisDefinitionComponent;
let fixture: ComponentFixture<YAxisDefinitionComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ YAxisDefinitionComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(YAxisDefinitionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,16 @@
import { Component, Input } from '@angular/core';
@Component({
selector: 'pdb-y-axis-definition',
templateUrl: './y-axis-definition.component.html',
styleUrls: ['./y-axis-definition.component.scss']
})
export class YAxisDefinitionComponent {
yAxisUnit: string = "SECONDS";
minYValue: number = 0;
maxYValue: number = 300;
constructor() {
}
}