--- order: 0 title: 图表套件组合展示 --- 利用 Ant Design Pro 提供的图表套件,可以灵活组合符合设计规范的图表来满足复杂的业务需求。 ````jsx import { ChartCard, yuan, Field, MiniArea, MiniBar, MiniProgress } from 'ant-design-pro/lib/Charts'; import Trend from 'ant-design-pro/lib/Trend'; import NumberInfo from 'ant-design-pro/lib/NumberInfo'; import { Row, Col, Icon, Tooltip } from 'antd'; import numeral from 'numeral'; import moment from 'moment'; const visitData = []; const beginDay = new Date().getTime(); for (let i = 0; i < 20; i += 1) { visitData.push({ x: moment(new Date(beginDay + (1000 * 60 * 60 * 24 * i))).format('YYYY-MM-DD'), y: Math.floor(Math.random() * 100) + 10, }); } ReactDOM.render( 本周访问} total={numeral(12321).format('0,0')} status="up" subTotal={17.1} /> } total={numeral(8846).format('0,0')} footer={} contentHeight={46} > } total="78%" footer={
周同比 12% 日环比 11%
} contentHeight={46} >
, mountNode); ````