import _ from 'lodash'; import React, { PureComponent } from 'react'; import Graph from 'app/viz/Graph'; import { Switch } from 'app/core/components/Switch/Switch'; import { getTimeSeriesVMs } from 'app/viz/state/timeSeries'; import { PanelProps, NullValueMode } from 'app/types'; interface Options { showBars: boolean; showLines: boolean; showPoints: boolean; onChange: (options: Options) => void; } interface Props extends PanelProps {} export class Graph2 extends PureComponent { constructor(props) { super(props); } render() { const { timeSeries, timeRange } = this.props; const { showLines, showBars, showPoints } = this.props.options; const vmSeries = getTimeSeriesVMs({ timeSeries: timeSeries, nullValueMode: NullValueMode.Ignore, }); return ( ); } } export class GraphOptions extends PureComponent { onToggleLines = () => { const options = this.props as Options; this.props.onChange({ ...options, showLines: !this.props.showLines, }); }; onTogglePoints = () => { const options = this.props as Options; this.props.onChange({ ...options, showPoints: !this.props.showPoints, }); }; render() { const { showBars, showPoints, showLines } = this.props; return (
Draw Modes
); } } export { Graph2 as PanelComponent, GraphOptions as PanelOptionsComponent };