only allow zoom by mouse wheel or selection when time axis is available

This commit is contained in:
2019-12-27 19:16:21 +01:00
parent 4f5fe15ac7
commit 90244c6e4b
3 changed files with 41 additions and 7 deletions

View File

@@ -93,14 +93,11 @@ export class PlotType {
}
compatible(others: Array<PlotType>) : boolean {
var result = true;
var other : PlotType;
var xAxisTypes = new Set([this.xAxis]);
var yAxisTypes = new Set([this.yAxis]);
for(var i = 0; i < others.length; i++){
other = others[i];
var other = others[i];
xAxisTypes.add(other.xAxis);
yAxisTypes.add(other.yAxis);
}
@@ -129,6 +126,24 @@ export enum DataType {
Other
}
export class AxesTypes {
x : Set<DataType>;
y : Set<DataType>;
constructor(x: Set<DataType>, y : Set<DataType>) {
this.x = x;
this.y = y;
}
hasXAxis(type : DataType){
return this.x.has(type);
}
hasYAxis(type : DataType){
return this.y.has(type);
}
}
export class Suggestion {
value: string;
newQuery: string;