Pie Charts
Generate a pie plot.
Examples
Pie Chart from Columns in a DataFrame
import { useEffect } from 'react';
import './App.css';
import { DataFrame } from "danfojs-nightly";
function App() {
useEffect(() => {
const df = new DataFrame({
Price: [19, 26, 55],
Location: ["NG", "GH", "SA"],
Type: ["Residential", "Non-Residential", "Utility"],
});
df.plot("plot_div").pie({ config: { values: "Price", labels: "Type" } });
}, [])
return (
<div className="App">
<header className="App-header">
<div id="plot_div"></div>
</header>
</div>
);
}
export default App;
Multiple Pie Chart from Columns in a DataFrame

Configure Position of Pie Charts

Last updated