|
|
@ -1,10 +1,9 @@ |
|
|
|
import { AbsoluteTimeRange } from '@grafana/data'; |
|
|
|
import { AbsoluteTimeRange } from '@grafana/data'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Convert Grafana options into Chartwerk Bar options
|
|
|
|
// Convert Grafana options into Chartwerk Bar options
|
|
|
|
export class BarOptions { |
|
|
|
export class BarOptions { |
|
|
|
constructor(private grafanaSeriesList: any[], private changeTimeRange: (timeRange: AbsoluteTimeRange) => void) { |
|
|
|
constructor(private grafanaSeriesList: any[], private changeTimeRange: (timeRange: AbsoluteTimeRange) => void) { |
|
|
|
console.log(this.grafanaSeriesList) |
|
|
|
console.log(this.grafanaSeriesList); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getChartwerkOptions(): any { |
|
|
|
getChartwerkOptions(): any { |
|
|
@ -34,7 +33,7 @@ export class BarOptions { |
|
|
|
eventsCallbacks: { |
|
|
|
eventsCallbacks: { |
|
|
|
zoomIn: (range: any) => { |
|
|
|
zoomIn: (range: any) => { |
|
|
|
this.changeTimeRange({ from: range[0][0], to: range[0][1] }); |
|
|
|
this.changeTimeRange({ from: range[0][0], to: range[0][1] }); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|