OptionaldataAdapter?: (data: TransformedData, config?: RechartsConfig) => RechartsRow[]Override the default data reshaping if needed.
Optionallabel?: stringimport { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip } from 'recharts';
import { createRechartsPlugin } from 'lumagrid/plugins';
registerPlugin(createRechartsPlugin({
id: 'recharts-bar',
label: 'Bar (Recharts)',
Renderer: ({ data, theme, width, height, config }) => (
<BarChart width={width} height={height} data={data}>
<CartesianGrid stroke={theme.gridColor} />
<XAxis dataKey={config?.nameKey ?? 'name'} tick={{ fill: theme.textColor, fontFamily: theme.fontFamily }} />
<YAxis tick={{ fill: theme.textColor }} />
<Tooltip />
<Bar dataKey={config?.dataKey ?? 'value'} fill={theme.colors[0]} />
</BarChart>
),
}));
Creates a Recharts bar (or any) chart plugin. You supply only the Recharts Renderer component; data reshaping and theme bridging are handled automatically.