import * as q from '../../../../../backend/src/Model' import * as React from 'react' import DateFormatter from '../../helper/DateFormatter' import { default as ReactResizeDetector } from 'react-resize-detector' import 'react-vis/dist/style.css' import { Base64Message } from '../../../../../backend/src/Model/Base64Message'; const { XYPlot, LineMarkSeries, Hint, YAxis, HorizontalGridLines } = require('react-vis') interface Props { data: {x: number, y: number}[] } interface Stats { width: number value?: any } class PlotHistory extends React.Component { constructor(props: Props) { super(props) this.state = { width: 300 } } private resize = (width: number, height: number) => { this.setState({ width: width - 12 }) } public render() { const data = this.props.data return (
{this.state.value ? : null}
) } private hintFormatter = (point: any) => { return [ { title: Time, value: }, { title: Value, value: point.y }, ] } private _forgetValue = () => { this.setState({ value: undefined, }) } private _rememberValue = (value: any) => { this.setState({ value }) } } export default PlotHistory