
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-pie-chart-explode
Advanced tools
A React pie chart component with smooth hover explode animation.
npm install react-pie-chart-explode

import { PieChart, PieChartConfig, PieSlice } from 'react-pie-chart-explode';
const data: PieSlice[] = [
{ value: 47, label: 'Category A', color: '#4CAF50' },
{ value: 25, label: 'Category B', color: '#2196F3' },
{ value: 15, label: 'Category C', color: '#FF9800' },
{ value: 13, label: 'Category D', color: '#E91E63' },
];
const config: PieChartConfig = {
width: 500,
height: 500,
explodeOffset: 20,
animationDuration: 200,
showLabels: true,
showPercentage: true,
};
function App() {
return (
<PieChart
data={data}
config={config}
onSliceClick={(slice, index) => console.log('Clicked:', slice.label)}
/>
);
}
| Prop | Type | Description |
|---|---|---|
data | PieSlice[] | Required. Array of data slices |
config | PieChartConfig | Chart configuration options |
className | string | CSS class for the container |
style | CSSProperties | Inline styles for the container |
onSliceClick | (slice, index) => void | Callback when a slice is clicked |
onSliceHover | (slice, index) => void | Callback when a slice is hovered |
tooltipRenderer | (slice, percentage) => ReactNode | Custom tooltip renderer |
| Property | Type | Description |
|---|---|---|
value | number | Required. Numeric value for the slice |
label | string | Required. Label text |
color | string | Required. Fill color (hex, rgb, etc.) |
| Property | Type | Default | Description |
|---|---|---|---|
width | number | 400 | Chart width in pixels |
height | number | 400 | Chart height in pixels |
innerRadius | number | 0 | Inner radius (0 for pie, >0 for donut) |
outerRadius | number | auto | Outer radius |
explodeOffset | number | 15 | Distance to move slice on hover |
animationDuration | number | 200 | Animation duration in ms |
showLabels | boolean | true | Show label text |
showPercentage | boolean | true | Show percentage values |
showOuterLabels | boolean | true | Show labels outside the chart |
labelOffset | number | 20 | Distance of labels from chart |
strokeColor | string | '#1a1a2e' | Border color between slices |
strokeWidth | number | 2 | Border width |
<PieChart data={data} />
<PieChart
data={data}
config={{
innerRadius: 80,
outerRadius: 150,
}}
/>
<PieChart
data={data}
config={config}
tooltipRenderer={(slice, percentage) => (
<div className="tooltip">
<strong>{slice.label}</strong>
<p>Value: {slice.value}</p>
<p>Percentage: {percentage.toFixed(2)}%</p>
</div>
)}
/>
<PieChart
data={data}
config={{
showLabels: false,
showPercentage: false,
showOuterLabels: false,
explodeOffset: 0,
}}
/>
MIT
FAQs
React pie chart component with hover explode animation
The npm package react-pie-chart-explode receives a total of 0 weekly downloads. As such, react-pie-chart-explode popularity was classified as not popular.
We found that react-pie-chart-explode demonstrated a healthy version release cadence and project activity because the last version was released less than 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.