@patternfly/react-charts
Version:
This library provides a set of React chart components for use with the PatternFly reference implementation.
22 lines • 1.24 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChartContainer = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const hoist_non_react_statics_1 = tslib_1.__importDefault(require("hoist-non-react-statics"));
const victory_core_1 = require("victory-core");
const chart_theme_1 = require("../ChartUtils/chart-theme");
const chart_helpers_1 = require("../ChartUtils/chart-helpers");
const ChartContainer = (_a) => {
var { className, themeColor,
// destructure last
theme = (0, chart_theme_1.getTheme)(themeColor) } = _a, rest = tslib_1.__rest(_a, ["className", "themeColor", "theme"]);
const chartClassName = (0, chart_helpers_1.getClassName)({ className });
// Note: className is valid, but Victory is missing a type
return (0, jsx_runtime_1.jsx)(victory_core_1.VictoryContainer, Object.assign({ className: chartClassName, theme: theme }, rest));
};
exports.ChartContainer = ChartContainer;
exports.ChartContainer.displayName = 'ChartContainer';
// Note: VictoryContainer.role must be hoisted
(0, hoist_non_react_statics_1.default)(exports.ChartContainer, victory_core_1.VictoryContainer);
//# sourceMappingURL=ChartContainer.js.map