UNPKG

@mui/x-charts

Version:

The community edition of the charts components (MUI X).

12 lines 305 B
const legendGetter = params => { const { seriesOrder, series } = params; return seriesOrder.flatMap(seriesId => series[seriesId].data.map(item => ({ color: item.color, label: item.label, id: item.id })).filter(item => item.label !== undefined)); }; export default legendGetter;