mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2026-01-26 01:19:42 +00:00
27 lines
544 B
JavaScript
27 lines
544 B
JavaScript
import React, { useState, useEffect } from 'react';
|
|
import { Area } from '@ant-design/charts';
|
|
import data from './data';
|
|
|
|
const XArea = (props) => {
|
|
const { configData: { title, description } } = props
|
|
const config = {
|
|
title: {
|
|
visible: true,
|
|
text: title || '',
|
|
},
|
|
description: {
|
|
visible: true,
|
|
text: description || '',
|
|
},
|
|
data,
|
|
xField: 'Date',
|
|
yField: 'scales',
|
|
xAxis: {
|
|
type: 'dateTime',
|
|
tickCount: 5,
|
|
}
|
|
};
|
|
return <Area {...config} />;
|
|
};
|
|
|
|
export default XArea; |