Advertisement
Guest User

Untitled

a guest
Aug 10th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Meteor } from 'meteor/meteor';
  2. import React, { Component } from 'react';
  3. import ReactDOM from 'react-dom';
  4.  
  5. import { Chart, Axis, Series, Tooltip, Cursor, Line } from 'react-charts';
  6. import { ResizableBox } from 'react-resizable'
  7.  
  8. export default class Estadisticas extends Component {
  9.  
  10.   render() {
  11.     const data = [
  12.       [[450, 100], [1000, 500], [1000, 250]],
  13.       [[600, 330], [200, 310], [400, 440]],
  14.       [[700, 203], [266, 344], [546, 299]]
  15.     ];
  16.     return (
  17.         <div>
  18.           <h1>Estadisticas</h1>
  19.             <ResizableBox width={500} height={300}>
  20.               <Chart data={data}>
  21.                 <Axis primary type="linear" position="bottom" />
  22.                 <Axis type="linear" position="left" />
  23.                 <Series type={Line} />
  24.                 <Cursor primary />
  25.                 <Cursor />
  26.                 <Tooltip />
  27.               </Chart>
  28.             </ResizableBox>
  29.         </div>
  30.     );
  31.   }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement