move axisScale to y-axis-definition component

This commit is contained in:
2020-02-08 12:53:50 +01:00
parent 4dc41faeae
commit 6109227508
4 changed files with 12 additions and 11 deletions

View File

@@ -33,13 +33,6 @@
<pdb-limit-by #limitbycomponent></pdb-limit-by> <pdb-limit-by #limitbycomponent></pdb-limit-by>
<mat-form-field>
<mat-label>Y-Axis:</mat-label>
<mat-select [(value)]="yAxisScale">
<mat-option value="LOG10">Logarithm</mat-option>
<mat-option value="LINEAR">Linear</mat-option>
</mat-select>
</mat-form-field>
<pdb-y-axis-definition #yAxisDefinitionComponent></pdb-y-axis-definition> <pdb-y-axis-definition #yAxisDefinitionComponent></pdb-y-axis-definition>

View File

@@ -31,8 +31,6 @@ export class VisualizationPageComponent implements OnInit {
@ViewChild(LimitByComponent, {static: false}) @ViewChild(LimitByComponent, {static: false})
private limitbycomponent : LimitByComponent; private limitbycomponent : LimitByComponent;
yAxisScale: string;
@ViewChild(YAxisDefinitionComponent, {static: false}) @ViewChild(YAxisDefinitionComponent, {static: false})
private yAxisDefinitionComponent : YAxisDefinitionComponent; private yAxisDefinitionComponent : YAxisDefinitionComponent;
@@ -75,7 +73,6 @@ export class VisualizationPageComponent implements OnInit {
that.groupBy = that.tagFields.filter(val => filterDefaults.groupBy.includes(val.name)); that.groupBy = that.tagFields.filter(val => filterDefaults.groupBy.includes(val.name));
that.splitBy = that.tagFields.find(val => filterDefaults.splitBy == val.name); that.splitBy = that.tagFields.find(val => filterDefaults.splitBy == val.name);
}); });
this.yAxisScale = "LOG10";
} }
changePlotType(selectedPlotTypes: Array<PlotType>) { changePlotType(selectedPlotTypes: Array<PlotType>) {
@@ -150,10 +147,10 @@ export class VisualizationPageComponent implements OnInit {
request.limitBy = this.limitbycomponent.limitBy; request.limitBy = this.limitbycomponent.limitBy;
request.limit = this.limitbycomponent.limit; request.limit = this.limitbycomponent.limit;
request.dateRange = this.dateRangeAsString(); request.dateRange = this.dateRangeAsString();
request.axisScale = this.yAxisScale;
request.aggregates = aggregates; request.aggregates = aggregates;
request.keyOutside = false; request.keyOutside = false;
request.generateThumbnail = this.enableGallery; request.generateThumbnail = this.enableGallery;
request.axisScale = this.yAxisDefinitionComponent.yAxisScale;
request.yRangeMin = this.yAxisDefinitionComponent.minYValue; request.yRangeMin = this.yAxisDefinitionComponent.minYValue;
request.yRangeMax = this.yAxisDefinitionComponent.maxYValue; request.yRangeMax = this.yAxisDefinitionComponent.maxYValue;
request.yRangeUnit = this.yAxisDefinitionComponent.yAxisUnit; request.yRangeUnit = this.yAxisDefinitionComponent.yAxisUnit;

View File

@@ -1,4 +1,13 @@
<div> <div>
<mat-form-field>
<mat-label>Y-Axis:</mat-label>
<mat-select [(value)]="yAxisScale">
<mat-option value="LOG10">Logarithm</mat-option>
<mat-option value="LINEAR">Linear</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="pdb-form-mid"> <mat-form-field class="pdb-form-mid">
<mat-label>Y-Axis Range:</mat-label> <mat-label>Y-Axis Range:</mat-label>
<mat-select [(value)]="yAxisUnit"> <mat-select [(value)]="yAxisUnit">

View File

@@ -7,6 +7,8 @@ import { Component, Input } from '@angular/core';
}) })
export class YAxisDefinitionComponent { export class YAxisDefinitionComponent {
yAxisScale: string = "LOG10";
yAxisUnit: string = "SECONDS"; yAxisUnit: string = "SECONDS";
minYValue: number = 0; minYValue: number = 0;
maxYValue: number = 300; maxYValue: number = 300;