Browse Source

lint fixes

pull/2/head
rozetko 2 years ago
parent
commit
37c8c899ef
  1. 13
      README.md
  2. 5
      src/models/options/barOptions.ts

13
README.md

@ -21,8 +21,9 @@
1. Create a new panel and select Chartwerk as the visualization
2. Add queries with unique aliases
3. Go to the Options Tab and setup panel:
- Choose visualization type
- Select metric in the Value -> Metric dropdown (by default, the first metric is used)
- Choose visualization type
- Select metric in the Value -> Metric dropdown (by default, the first metric is used)
## Demo
@ -35,12 +36,12 @@ see [demo](https://grafana.corpglory.com/d/8vGyMypGz/demo-home?orgId=4)
- Value:
- Metric: select metric query from dropdown
- Extemum:
- Min:
- type number for static minimum value OR
- Min:
- type number for static minimum value OR
- enable "Use metric" toggle switch to select metric as minimun
- default value: 0
- default value: 0
- Max:
- type number for static maximum OR
- type number for static maximum OR
- enable "Use metric" toggle switch to select metric as maximum
- default value: maximum of metric query

5
src/models/options/barOptions.ts

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

Loading…
Cancel
Save