duoyun-ui
Version:
A lightweight desktop UI component library, implemented using Gem
19 lines (18 loc) • 894 B
JavaScript
import React from 'react';
import { forwardRef, useImperativeHandle, useRef, useLayoutEffect } from 'react';
export * from '../elements/area-chart';
export const DyAreaChart = forwardRef(function (props, ref) {
const elementRef = useRef(null);
useImperativeHandle(ref, () => {
return {};
}, []);
// React Bug?
useLayoutEffect(() => {
const element = elementRef.current;
["fill", "stroke", "stack", "symbol", "symbolRender", "chartzoom", "chartZoom", "range", "smooth", "gradient", "sequences", "aspectRatio", "filters", "colors", "xAxi", "yAxi", "pAxi", "yMin", "yMax", "xStep", "yStep", "pStep", "tooltip", "markLines", "loading", "noData", "genGradientId"].map(name => {
element[name] = props[name];
});
}, []);
return React.createElement("dy-area-chart", { ref: elementRef, ...props });
});
export default DyAreaChart;