UNPKG

@mui/x-charts

Version:

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

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