Quellcode durchsuchen

Fix pieType change

corpglory-dev vor 6 Jahren
Ursprung
Commit
568bc1c72d
1 geänderte Dateien mit 1 neuen und 3 gelöschten Zeilen
  1. 1 3
      public/app/plugins/panel/piechart/PiechartOptionsBox.tsx

+ 1 - 3
public/app/plugins/panel/piechart/PiechartOptionsBox.tsx

@@ -9,14 +9,12 @@ import { FormField, PanelEditorProps } from '@grafana/ui';
 import { PiechartType } from '@grafana/ui';
 import { PiechartOptions } from './types';
 
-import * as _ from 'lodash';
-
 const labelWidth = 8;
 
 const piechartOptions = [{ value: PiechartType.PIE, label: 'Pie' }, { value: PiechartType.DONUT, label: 'Donut' }];
 
 export class PiechartOptionsBox extends PureComponent<PanelEditorProps<PiechartOptions>> {
-  onPieTypeChange = ({ target }) => this.props.onOptionsChange({ ...this.props.options, pieType: target.value });
+  onPieTypeChange = pieType => this.props.onOptionsChange({ ...this.props.options, pieType: pieType.value });
   onStrokeWidthChange = ({ target }) =>
     this.props.onOptionsChange({ ...this.props.options, strokeWidth: target.value });