only allow zoom by mouse wheel or selection when time axis is available
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { PlotService, PlotType, PlotRequest, PlotResponse, TagField, FilterDefaults } from '../plot.service';
|
||||
import { PlotService, PlotType, PlotRequest, PlotResponse, TagField, FilterDefaults, DataType, AxesTypes } from '../plot.service';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { FormControl, Validators } from '@angular/forms';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
@@ -99,11 +99,27 @@ export class VisualizationPageComponent implements OnInit {
|
||||
const request = this.createPlotRequest();
|
||||
this.galleryView.renderGallery(request, this.splitBy.name);
|
||||
}
|
||||
|
||||
getAxes() : AxesTypes {
|
||||
|
||||
var x = new Set<DataType>();
|
||||
var y = new Set<DataType>();
|
||||
|
||||
for(var i = 0; i < this.selectedPlotType.length; i++){
|
||||
var plotType = this.selectedPlotType[i];
|
||||
x.add(plotType.xAxis);
|
||||
y.add(plotType.yAxis);
|
||||
}
|
||||
|
||||
return new AxesTypes(x,y);
|
||||
}
|
||||
|
||||
plot(){
|
||||
const that = this;
|
||||
|
||||
that.plotView.imageUrl = '';
|
||||
this.plotView.axes = this.getAxes();
|
||||
console.log(JSON.stringify(this.getAxes()));
|
||||
that.galleryView.show=false;
|
||||
document.dispatchEvent(new Event("invadersStart", {}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user