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 }], }; } }