UNPKG

@mui/x-charts

Version:

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

15 lines 402 B
var legendGetter = function legendGetter(params) { var seriesOrder = params.seriesOrder, series = params.series; var data = seriesOrder.map(function (seriesId) { return { color: series[seriesId].color, label: series[seriesId].label, id: seriesId }; }); return data.filter(function (item) { return item.label !== undefined; }); }; export default legendGetter;