This repository has been archived by the owner on Oct 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bdd4b70
commit f6cac54
Showing
8 changed files
with
60 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,43 @@ | ||
import React, { Component } from 'react'; | ||
import logo from './logo.svg'; | ||
import './App.css'; | ||
import Sum from './component/Sum'; | ||
import { Provider } from 'react-redux' | ||
import { createStore } from 'redux' | ||
import Reducer from './reducers/index'; | ||
import SimpleLineChart from './component/realtimechat' | ||
import RealTimeChart from './component/RealTimeChart' | ||
|
||
|
||
const data = [ | ||
|
||
{ | ||
Forca:1000, Velocidade: 3000, amt: 3000, //Ponto 1 | ||
}, | ||
{ | ||
Forca:2000, Velocidade: 2000, amt: 200, | ||
}, | ||
{ | ||
Forca:3000, Velocidade: 1000, amt: 2290, | ||
}, | ||
/**{ | ||
cd:400, uv: 2780, pv: 3908, amt: 2000, Outros pontos | ||
}, | ||
{ | ||
name: 'Page E', uv: 1890, pv: 4800, amt: 2181, | ||
}, | ||
{ | ||
name: 'Page F', uv: 2390, pv: 3800, amt: 2500, | ||
}, | ||
{ | ||
name: 'Page G', uv: 3490, pv: 4300, amt: 2100, | ||
},*/ | ||
]; | ||
|
||
export default class App extends React.Component { | ||
render() { | ||
return ( | ||
<center> | ||
<SimpleLineChart/> | ||
<RealTimeChart data = {data} Y = "Eixo Y" X = "Eixo X" Label1 = "Forca" Label2 = "Velocidade"/> | ||
|
||
</center> | ||
); | ||
} | ||
} | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React, { PureComponent } from 'react'; | ||
import { | ||
LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, | ||
} from 'recharts'; | ||
|
||
|
||
export default class RealTimeChart extends React.Component { | ||
|
||
render() { | ||
return ( | ||
|
||
<LineChart | ||
width={600} | ||
height={300} | ||
data={this.props.data} | ||
margin={{ | ||
top: 8, right: 5, left: 5, bottom: 5, | ||
}} | ||
> | ||
|
||
<CartesianGrid strokeDasharray="2 3" /> | ||
<XAxis dataKey="name" label={{ value: this.props.X, position: 'insideBottomRight', offset: -5 }} /> | ||
<YAxis label={{ value: this.props.Y, angle: -90, position: 'insideLeft' }}/> | ||
<Tooltip/> | ||
<Legend /> | ||
<Line type="monotone" dataKey= {this.props.Label1} stroke="#FF1493" activeDot={{ r: 8 }} /> | ||
<Line type="monotone" dataKey= {this.props.Label2} stroke=" #FF8C69" /> | ||
</LineChart> | ||
|
||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.