@polygonschmied/stellar-charts
v0.1.4
Published
Stellar DS chart components — recharts pre-styled with the Theater palette.
Maintainers
Readme
@polygonschmied/stellar-charts
Chart components for Stellar DS — recharts pre-styled with the Theater palette and sensible defaults for axes, grid, tooltip, and a categorical accent scale.
Install
pnpm add @polygonschmied/stellar-charts @polygonschmied/stellar-tokensstellar-tokens is required (chart colors come from CSS variables).
Peer dependencies: react >= 18, react-dom >= 18. recharts ships as a
direct dependency — no extra install needed.
Use
import "@polygonschmied/stellar-tokens/styles.css";
import { LineChart } from "@polygonschmied/stellar-charts";
const data = [
{ x: "Jan", revenue: 120 },
{ x: "Feb", revenue: 180 },
{ x: "Mar", revenue: 240 },
];
export function Revenue() {
return <LineChart data={data} xKey="x" series={[{ dataKey: "revenue", label: "Revenue" }]} />;
}Available wrappers: ChartFrame, LineChart, BarChart, AreaChart,
ScatterChart, PieChart, plus the shared StellarTooltip and the
stellarChartTheme / stellarSeriesColors exports.
Need to drop down to raw recharts? The package re-exports Area, Bar,
Line, XAxis, YAxis, CartesianGrid, Legend, ResponsiveContainer,
ReferenceLine, ReferenceArea, ReferenceDot, Cell, Pie, Scatter,
Tooltip, ZAxis so you don't need a second dependency.
License
MIT — see the repo README for the wider picture.
