
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
butterfly-chart-react
Advanced tools
Re-usable Butterfly React Chart Component allows to visually compare bar graph time series data analysis of 2 datasets that represent same period of time.
npm install --save-dev butterfly-chart-react # using npm
yarn add butterfly-chart-react # using yarn
import React, {Component} from 'react';
import {ButterflyChart} from 'butterfly-chart-react';
class App extends Component {
state = {
title: 'Chart Title',
option_select_1: 'Dataset Title 1',
option_select_2: 'Dataset Title 2',
highest_value: '',
data_option_1: [{time_period: '2010', value: '345'}, {time_period: '2011', value: '650'}],
data_option_2: [{time_period: '2010', value: '345'}, {time_period: '2011', value: '650'}],
barColor_1: '#aab6ca',
barColor_2: '#c7f0db',
}
render() {
return (
<div className="App">
<ButterflyChart
title={this.state.title}
option_select_1={this.state.option_select_1}
option_select_2={this.state.option_select_2}
data_option_1={this.state.data_option_1}
data_option_2={this.state.data_option_2}
highest_value={this.state.highest_value}
barColor_1={this.state.barColor_1}
barColor_2={this.state.barColor_2}
/>
</div>
);
}
}
Please use state as shown above. When using data returned by an API that can be structured very differently, the easiest way would be to loop/map through that data and put it in the similarly structured state.
Additional usage notes:
FAQs
Butterfly Chart Component for React
We found that butterfly-chart-react 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.