put y axis definition into its own object
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<div>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Y-Axis:</mat-label>
|
||||
<mat-label>Y{{yIndex}}-Axis:</mat-label>
|
||||
<mat-select [(value)]="yAxisScale">
|
||||
<mat-option value="LOG10">Logarithm</mat-option>
|
||||
<mat-option value="LINEAR">Linear</mat-option>
|
||||
@@ -9,7 +8,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="pdb-form-mid">
|
||||
<mat-label>Y-Axis Range:</mat-label>
|
||||
<mat-label>Y{{yIndex}}-Axis Range:</mat-label>
|
||||
<mat-select [(value)]="yAxisUnit">
|
||||
<mat-option value="AUTOMATIC">automatic</mat-option>
|
||||
<mat-option value="MILLISECONDS">millis</mat-option>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { YAxisDefinition } from '../plot.service';
|
||||
|
||||
@Component({
|
||||
selector: 'pdb-y-axis-definition',
|
||||
@@ -7,12 +8,23 @@ import { Component, Input } from '@angular/core';
|
||||
})
|
||||
export class YAxisDefinitionComponent {
|
||||
|
||||
|
||||
yAxisScale: string = "LOG10";
|
||||
yAxisUnit: string = "SECONDS";
|
||||
minYValue: number = 0;
|
||||
maxYValue: number = 300;
|
||||
|
||||
@Input()
|
||||
yIndex: string = "";
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
getAxisDefinition() {
|
||||
const result = new YAxisDefinition();
|
||||
result.axisScale = this.yAxisScale;
|
||||
result.rangeMin = this.minYValue;
|
||||
result.rangeMax = this.maxYValue;
|
||||
result.rangeUnit = this.yAxisUnit;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user