use y1/y2 axis definitions
This commit is contained in:
@@ -33,10 +33,8 @@
|
||||
|
||||
<pdb-limit-by #limitbycomponent></pdb-limit-by>
|
||||
|
||||
|
||||
<pdb-y-axis-definition #y1AxisDefinitionComponent yIndex="1"></pdb-y-axis-definition>
|
||||
|
||||
|
||||
<pdb-y-axis-definition #y2AxisDefinitionComponent yIndex="2" *ngIf="y2AxisAvailable"></pdb-y-axis-definition>
|
||||
|
||||
<mat-checkbox [(ngModel)]="enableGallery">Gallery</mat-checkbox>
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ export class VisualizationPageComponent implements OnInit {
|
||||
|
||||
enableGallery = false;
|
||||
splitBy = null;
|
||||
y2AxisAvailable = false;
|
||||
|
||||
constructor(private plotService: PlotService, private snackBar: MatSnackBar) {
|
||||
}
|
||||
@@ -83,6 +84,9 @@ export class VisualizationPageComponent implements OnInit {
|
||||
const compatiblePlotTypes = this.plotTypes.filter(pt => pt.compatible(selectedPlotTypes));
|
||||
this.plotTypes.forEach(pt => pt.active=false);
|
||||
compatiblePlotTypes.forEach(pt => pt.active=true);
|
||||
|
||||
const axesTypes = this.getAxes();
|
||||
this.y2AxisAvailable = axesTypes.y.length == 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +148,7 @@ export class VisualizationPageComponent implements OnInit {
|
||||
this.selectedPlotType.forEach(a => aggregates.push(a.id));
|
||||
|
||||
const y1 = this.y1AxisDefinitionComponent.getAxisDefinition();
|
||||
const y2 = this.y2AxisDefinitionComponent.getAxisDefinition();
|
||||
const y2 = this.y2AxisDefinitionComponent ? this.y2AxisDefinitionComponent.getAxisDefinition() : undefined;
|
||||
|
||||
const request = new PlotRequest();
|
||||
request.query = this.query.query;
|
||||
|
||||
@@ -10,18 +10,24 @@
|
||||
<mat-form-field class="pdb-form-mid">
|
||||
<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>
|
||||
<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-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-option value="AUTOMATIC_TIME">auto (time)</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-optgroup>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="yAxisUnit !== 'AUTOMATIC'" class="pdb-form-number">
|
||||
<mat-form-field *ngIf="yAxisUnit !== 'AUTOMATIC_TIME' && yAxisUnit !== 'AUTOMATIC_NUMBER'" 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">
|
||||
<mat-form-field *ngIf="yAxisUnit !== 'AUTOMATIC_TIME' && yAxisUnit !== 'AUTOMATIC_NUMBER'" class="pdb-form-number">
|
||||
<input matInput type="number" placeholder="Max" min="0" [(ngModel)]="maxYValue">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user