@mui/x-charts
Version:
The community edition of MUI X Charts components.
45 lines • 1.16 kB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
const _excluded = ["bars", "skipAnimation"];
import * as React from 'react';
import { BarLabelItem } from "./BarLabelItem.js";
import { jsx as _jsx } from "react/jsx-runtime";
/**
* @ignore - internal component.
*/
function BarLabelPlot(props) {
const {
bars,
skipAnimation
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
return /*#__PURE__*/_jsx(React.Fragment, {
children: bars.map(({
xOrigin,
yOrigin,
x,
y,
seriesId,
dataIndex,
color,
value,
width,
height,
layout
}) => /*#__PURE__*/_jsx(BarLabelItem, _extends({
seriesId: seriesId,
dataIndex: dataIndex,
value: value,
color: color,
xOrigin: xOrigin,
yOrigin: yOrigin,
x: x,
y: y,
width: width,
height: height,
skipAnimation: skipAnimation ?? false,
layout: layout ?? 'vertical'
}, other), `${seriesId}-${dataIndex}`))
});
}
export { BarLabelPlot };