make default for 'splitBy' configurable
This commit is contained in:
@@ -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};
|
||||
}
|
||||
|
||||
@@ -170,4 +170,5 @@ export class DataSeriesStats {
|
||||
export class FilterDefaults {
|
||||
groupBy: Array<string>;
|
||||
fields: Array<string>;
|
||||
splitBy: string;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user