Commit 0633dba3 by corpglory-dev

Fixes after merging #15468

parent a053fb59
import React, { PureComponent } from 'react';
import { PanelOptionsProps, PanelOptionsGrid } from '@grafana/ui';
import { PanelEditorProps, PanelOptionsGrid } from '@grafana/ui';
import ValueOptions from './ValueOptions';
import { PiechartOptions } from './types';
export const defaultProps = {
options: {
pieType: 'pie',
unit: 'short',
stat: 'current',
strokeWidth: 1,
},
};
export default class PiechartPanelOptions extends PureComponent<PanelOptionsProps<PiechartOptions>> {
export default class PiechartPanelOptions extends PureComponent<PanelEditorProps<PiechartOptions>> {
static defaultProps = defaultProps;
render() {
......
import PiechartPanelOptions, { defaultProps } from './PiechartPanelOptions';
import { ReactPanelPlugin } from '@grafana/ui';
import PiechartPanelEditor from './PiechartPanelEditor';
import { PiechartPanel } from './PiechartPanel';
import { PiechartOptions, defaults } from './types';
export const reactPanel = new ReactPanelPlugin<PiechartOptions>(PiechartPanel);
export { PiechartPanel as Panel, PiechartPanelOptions as PanelOptions, defaultProps as PanelDefaults };
reactPanel.setEditor(PiechartPanelEditor);
reactPanel.setDefaults(defaults);
......@@ -5,3 +5,10 @@ export interface PiechartOptions {
strokeWidth: number;
// TODO: Options for Legend / Combine components
}
export const defaults: PiechartOptions = {
pieType: 'pie',
unit: 'short',
stat: 'current',
strokeWidth: 1,
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment