diff --git a/public/app/plugins/panel/graph2/module.tsx b/public/app/plugins/panel/graph2/module.tsx index 4011458bea9..7bb2ab48e40 100644 --- a/public/app/plugins/panel/graph2/module.tsx +++ b/public/app/plugins/panel/graph2/module.tsx @@ -12,6 +12,10 @@ import { PanelProps, NullValueMode } from 'app/types'; interface Options { showBars: boolean; + showLines: boolean; + showPoints: boolean; + + onChange: (options: Options) => void; } interface Props extends PanelProps { @@ -35,14 +39,27 @@ export class Graph2 extends PureComponent { } } -export class TextOptions extends PureComponent { - onChange = () => {}; +export class TextOptions extends PureComponent { + onToggleLines = () => { + const options = this.props as Options; + + this.props.onChange({ + ...options, + showLines: !this.props.showLines, + }); + }; render() { + const { showBars, showPoints, showLines } = this.props; + return ( -
-
Draw Modes
- +
+
+
Draw Modes
+ + + +
); }