@mui/x-charts
Version:
The community edition of the charts components (MUI X).
18 lines (17 loc) • 680 B
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
function defaultizeValueFormatter(series, defaultValueFormatter) {
const defaultizedSeries = {};
Object.keys(series).forEach(seriesId => {
defaultizedSeries[seriesId] = (0, _extends2.default)({}, series[seriesId], {
valueFormatter: series[seriesId].valueFormatter ?? defaultValueFormatter
});
});
return defaultizedSeries;
}
var _default = exports.default = defaultizeValueFormatter;
;