use y1/y2 axis definitions

This commit is contained in:
2020-02-09 20:14:13 +01:00
parent 859491e99e
commit 57d016245c
20 changed files with 178 additions and 104 deletions

View File

@@ -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;