You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
732 B

import { PanelOptions } from 'types';
// Convert Grafana options into Chartwerk options
export class Options {
constructor(private grafanaOptions: PanelOptions) {}
public getChartwerkOptions(): any {
return {
maxValue: this.grafanaOptions.gauge.max.value || 0,
minValue: this.grafanaOptions.gauge.min.value || 0,
valueFormatter: (val: any) => val.toFixed(2),
defaultColor: 'green',
stops: [
{
color: 'green',
value: 100,
},
{
color: 'orange',
value: 140,
},
],
// @ts-ignore
icons: [{ src: 'https://cityhost.ua/upload_img/blog5ef308ea5529c_trash2-01.jpg', position: 'middle', size: 30 }],
};
}
}