make default for 'splitBy' configurable

This commit is contained in:
2019-11-10 16:33:37 +01:00
parent 8d690ff0e7
commit d9b2327f35
7 changed files with 25 additions and 12 deletions

View File

@@ -63,10 +63,8 @@ export class PlotViewComponent implements OnInit {
const x= event.clientX - rect.left;
const y= event.clientY - rect.top;
//console.log("pos: " + x+"x" +y+ " rect: "+rect.x+"x"+rect.y + " client: "+ event.clientX+"x"+ event.clientY + " offset:" + event.offsetX+"x"+event.offsetY );
console.log(JSON.stringify(rect));
//console.log(JSON.stringify(rect));
return {x: x, y: y};
}

View File

@@ -170,4 +170,5 @@ export class DataSeriesStats {
export class FilterDefaults {
groupBy: Array<string>;
fields: Array<string>;
splitBy: string;
}

View File

@@ -81,7 +81,7 @@
mat-button
matTooltip="Create Gallery"
(click)="plot()"
[disabled]="this.splitBy.value == null">
[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>

View File

@@ -46,9 +46,7 @@ export class VisualizationPageComponent implements OnInit {
plotView: PlotViewComponent;
enableGallery = false;
splitBy = new FormControl(null, [
Validators.required
]);
splitBy = null;
constructor(private plotService: PlotService) {
}
@@ -69,6 +67,7 @@ export class VisualizationPageComponent implements OnInit {
});
that.groupBy = that.tagFields.filter(val => filterDefaults.groupBy.includes(val.name));
that.splitBy = that.tagFields.find(val => filterDefaults.splitBy == val.name);
});
this.yAxisScale = "LOG10";