UNPKG

@patternfly/react-charts

Version:

This library provides a set of React chart components for use with the PatternFly reference implementation.

37 lines 2.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ChartBulletComparativeErrorMeasure = void 0; const tslib_1 = require("tslib"); const React = tslib_1.__importStar(require("react")); const hoist_non_react_statics_1 = tslib_1.__importDefault(require("hoist-non-react-statics")); const victory_bar_1 = require("victory-bar"); const ChartContainer_1 = require("../ChartContainer"); const ChartUtils_1 = require("../ChartUtils"); const ChartBulletComparativeMeasure_1 = require("./ChartBulletComparativeMeasure"); const ChartBulletComparativeErrorMeasure = ({ allowTooltip = true, ariaDesc, ariaTitle, barWidth, constrainToVisibleArea = false, data, domain, horizontal = true, labelComponent, labels, measureComponent = React.createElement(ChartBulletComparativeMeasure_1.ChartBulletComparativeMeasure, null), padding, standalone = true, themeColor, // eslint-disable-next-line @typescript-eslint/no-unused-vars themeVariant, y, // destructure last theme = (0, ChartUtils_1.getBulletComparativeErrorMeasureTheme)(themeColor), height = theme.bar.height, width = theme.bar.width }) => { // Comparative measure component const measure = React.cloneElement(measureComponent, Object.assign({ allowTooltip, ariaDesc, ariaTitle, barWidth, constrainToVisibleArea, data, domain, height, horizontal, labelComponent, labels, padding, standalone: false, theme, width, y }, measureComponent.props)); return standalone ? (React.createElement(ChartContainer_1.ChartContainer, { desc: ariaDesc, height: height, title: ariaTitle, width: width }, measure)) : (React.createElement(React.Fragment, null, measure)); }; exports.ChartBulletComparativeErrorMeasure = ChartBulletComparativeErrorMeasure; exports.ChartBulletComparativeErrorMeasure.displayName = 'ChartBulletComparativeErrorMeasure'; // Note: VictoryBar.role must be hoisted (0, hoist_non_react_statics_1.default)(exports.ChartBulletComparativeErrorMeasure, victory_bar_1.VictoryBar); //# sourceMappingURL=ChartBulletComparativeErrorMeasure.js.map