Created
April 7, 2016 17:01
-
-
Save wordyallen/c85c586a9f88acce8ad65b1696fbec4d to your computer and use it in GitHub Desktop.
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
var Datum = React.createClass({ | |
render: function() { | |
// chart properties | |
var dataSets = [ | |
{ | |
values: this.props.dataset1, | |
key: "Transmitted Signal", | |
color: '#1FB0C5' | |
}, | |
{ | |
values: this.props.dataset2, | |
key: 'Received Signal', | |
color: '#2ca02c' | |
} | |
]; | |
var xAxis= | |
{ | |
axisLabel: 'Sample/Bit Index', | |
tickFormat: d3.format(',r') | |
} | |
var yAxis= | |
{ | |
axisLabel: 'Relative Voltage', | |
tickFormat: d3.format('.02f') | |
} | |
return ( | |
<div className="datum"> | |
<h4> | |
At a noise level of {this.props.noise}, | |
the following message was received: | |
{this.props.children} | |
</h4> | |
<NVD3Chart | |
type="lineChart" | |
useInteractiveGuideline={true} | |
datum={dataSets} | |
xAxis={xAxis} yAxis={yAxis} | |
/> | |
</div> | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment