
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-rt-chart
Advanced tools
A React component wrapping c3.js flow API that makes it easy to create real-time charts.
npm install react-rt-chart
import RTChart from 'react-rt-chart';
componentDidMount() {
setInterval(() => this.forceUpdate(), 1000);
},
render() {
var data = {
date: new Date(),
Car: getRandomValue(),
Bus: getRandomValue()
};
return <RTChart
fields={['Car','Bus']}
data={data} />
}

To use the default styling include c3.css from github or from node_modules/c3 within react-rt-chart.
fields (required)The names of the provided values
fields={['name_1', 'name_2']}
dataNew value to append to graph
{
date: new Date(),
name_1: 100,
name_2: 200
}
maxValues (default - 30)The number of values visible on the graph.
maxValues={60}
initialDataAn list of values that will be loaded into the graph immediately.
var initialdata = [
{ date: .., name_1: .., name_2: ..},
{ date: .., name_1: .., name_2: ..},
..
];
initialData={initialData}
chartChart options. See c3js - references for all options. Example
var chart = {
axis: {
y: { min: 50, max: 100 }
},
point: {
show: false
}
};
return <RtChart
chart={chart}
fields={['data1','data2']}
data={this.state.data} />
}
flowAnimation options. See c3.js flow API for all options.
render() {
var flow = {
duration: 200
};
return <RtChart
flow={flow}
fields={['data1','data2']}
data={this.state.data} />
}
resetReset and unload the chart if true.
reset={true}
v2.0.0v1.3.0v1.2.0v1.1.4v1.1.3Make it possible to change chart types
v1.0.0Changed:
Data format have changed from using an id field to just use the object properties New format:
data={{date: [Date], val1: [Number], val2: [Number], ...}}
Added
initialData={[]}0.0.1Inital version.
FAQs
Real-time chart component for React using c3
We found that react-rt-chart demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.