@alicloud/cloud-charts
Version:

29 lines (27 loc) • 839 B
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import React, { useEffect } from 'react';
import PercentBar from './percentBar';
import { FullCrossName, PrefixName } from '../constants';
import chartLog from '../common/log';
var prefix = FullCrossName + " " + PrefixName + "-wcapacity";
var Wcapacity = function Wcapacity(_ref) {
var data = _ref.data,
config = _ref.config,
height = _ref.height,
style = _ref.style;
useEffect(function () {
// 图表初始化时记录日志
chartLog('Wnumbercard', 'init');
}, []);
return /*#__PURE__*/React.createElement("div", {
className: prefix,
style: _extends({
height: height || '100%'
}, style)
}, /*#__PURE__*/React.createElement(PercentBar, {
config: config,
data: data,
prefix: prefix
}));
};
export default Wcapacity;