first step to show plot on dashboard

This commit is contained in:
2023-02-26 14:07:19 +01:00
parent ea3ccabe56
commit fb5c8ea019
19 changed files with 114 additions and 55 deletions

View File

@@ -180,15 +180,14 @@ export class VisualizationPageComponent implements OnInit {
}
});
}
createPlotRequest(): PlotRequest {
createPlotConfig(): PlotConfig {
const aggregates = new Array<string>();
this.selectedPlotType.forEach(a => aggregates.push(a.id));
const y1 = this.y1AxisDefinitionComponent.getAxisDefinition();
const y2 = this.y2AxisDefinitionComponent ? this.y2AxisDefinitionComponent.getAxisDefinition() : undefined;
const results = document.getElementById("results");
const config = new PlotConfig(
this.query.query,
this.groupBy.map(o => o.name),
@@ -202,6 +201,13 @@ export class VisualizationPageComponent implements OnInit {
this.intervalValue,
this.renderBarChartTickLabels,
);
return config;
}
createPlotRequest(): PlotRequest {
const results = document.getElementById("results");
const config = this.createPlotConfig();
const request = new PlotRequest(
results != null ? results.offsetHeight-1: 1024,