@mui/x-charts
Version:
The community edition of the Charts components (MUI X).
19 lines (18 loc) • 592 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createIsFaded = void 0;
const createIsFaded = (highlightScope, highlightedItem) => input => {
if (!highlightScope) {
return false;
}
if (highlightScope.fade === 'series') {
return input.seriesId === highlightedItem?.seriesId && input.dataIndex !== highlightedItem?.dataIndex;
}
if (highlightScope.fade === 'global') {
return input.seriesId !== highlightedItem?.seriesId || input.dataIndex !== highlightedItem?.dataIndex;
}
return false;
};
exports.createIsFaded = createIsFaded;
;