add limit by

This commit is contained in:
2019-10-19 08:48:21 +02:00
parent a3099d4981
commit 24bf7c98e3
15 changed files with 286 additions and 110 deletions

View File

@@ -1,80 +1,92 @@
<style>
</style>
<div id="visualization">
<div id="query-box">
<!-- [query]="query"-->
<pdb-query-autocomplete ></pdb-query-autocomplete>
</div>
<div id="filters">
<mat-form-field class="mat-field-full-width">
<mat-label>Date Range:</mat-label>
<input matInput [formControl]="dateRange" name="dates" />
</mat-form-field>
<mat-form-field class="mat-field-full-width">
<mat-label>Type:</mat-label>
<mat-select [formControl]="selectedPlotType">
<mat-option *ngFor="let plotType of plotTypes" [value]="plotType.name">
<img src="assets/img/{{plotType.icon}}.svg" class="icon-select" /> {{plotType.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-label>Combine with:</mat-label>
<mat-select [(value)]="selectedCombinePlotType">
<mat-option>-</mat-option>
<mat-option *ngFor="let plotType of combinePlotTypes" [value]="plotType.name">
<img src="assets/img/{{plotType.icon}}.svg" class="icon-select" /> {{plotType.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-label>Group By:</mat-label>
<mat-select multiple>
<mat-option *ngFor="let tagField of tagFields" [value]="tagField">{{tagField.name}}</mat-option>
</mat-select>
</mat-form-field>
<div id="filterpanel">
<mat-form-field class="mat-field-full-width">
<mat-label>Date Range:</mat-label>
<input matInput [formControl]="dateRange" name="dates" />
</mat-form-field>
<mat-form-field>
<mat-label>Split By:</mat-label>
<mat-select>
<mat-option>-</mat-option>
<mat-option *ngFor="let tagField of tagFields" [value]="tagField">{{tagField.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="mat-field-full-width">
<mat-label>Type:</mat-label>
<mat-select [formControl]="selectedPlotType">
<mat-option *ngFor="let plotType of plotTypes" [value]="plotType.name">
<img src="assets/img/{{plotType.icon}}.svg" class="icon-select" /> {{plotType.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-label>Y-Axis:</mat-label>
<mat-select [(value)]="yAxis">
<mat-option value="log">Logarithm</mat-option>
<mat-option value="linear">Linear</mat-option>
</mat-select>
</mat-form-field>
<pdb-y-axis-range
[(yAxisUnit)]="yAxisUnit"
[(minYValue)]="minYValue"
[(maxYValue)]="maxYValue"
></pdb-y-axis-range>
<div>
<button mat-button (click)="plot()">
<img src="assets/img/scatter-chart2.svg" class="icon-inline" aria-hidden="true" title="create plot" />
Plot
</button>
<!--
<button mat-button (click)="gallery()">
<img src="assets/img/four-squares-line.svg" class="icon-inline" aria-hidden="true" title="Create Gallery (only active if 'Split' is set)" />
Gallery
</button>
-->
<mat-form-field>
<mat-label>Combine with:</mat-label>
<mat-select [(value)]="selectedCombinePlotType">
<mat-option>-</mat-option>
<mat-option *ngFor="let plotType of combinePlotTypes" [value]="plotType.name">
<img src="assets/img/{{plotType.icon}}.svg" class="icon-select" /> {{plotType.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-label>Group By:</mat-label>
<mat-select multiple [(value)]="groupBy">
<mat-option *ngFor="let tagField of tagFields" [value]="tagField">{{tagField.name}}</mat-option>
</mat-select>
</mat-form-field>
<pdb-limit-by
[(limitBy)]="limitBy"
[limit]="limit"
></pdb-limit-by>
<mat-form-field>
<mat-label>Y-Axis:</mat-label>
<mat-select [(value)]="yAxis">
<mat-option value="log">Logarithm</mat-option>
<mat-option value="linear">Linear</mat-option>
</mat-select>
</mat-form-field>
<pdb-y-axis-range
[(yAxisUnit)]="yAxisUnit"
[(minYValue)]="minYValue"
[(maxYValue)]="maxYValue"
></pdb-y-axis-range>
<mat-checkbox [(ngModel)]="enableGallery">Gallery</mat-checkbox>
<mat-form-field *ngIf="enableGallery">
<mat-label>Split By:</mat-label>
<mat-select [(value)]="splitBy">
<mat-option *ngFor="let tagField of tagFields" [value]="tagField">{{tagField.name}}</mat-option>
</mat-select>
<mat-error *ngIf="splitBy == null || true">
Please select a value!
</mat-error>
</mat-form-field>
<div id="plot-button-bar">
<button
*ngIf="!enableGallery"
mat-button
matTooltip="Create Plot"
(click)="plot()">
<img src="assets/img/scatter-chart2.svg" class="icon-inline" aria-hidden="true" title="create plot" />
Plot
</button>
<button
*ngIf="enableGallery"
mat-button
matTooltip="Create Gallery"
(click)="plot()"
[disabled]="this.splitBy == null">
<img src="assets/img/four-squares-line.svg" class="icon-inline" aria-hidden="true" title="Create Gallery (only active if 'Split' is set)" />
Gallery
</button>
</div>
</div>
</div>
<div id="results"></div>