UNPKG

756 BTypeScriptView Raw
1import React from 'react';
2type IOptions = Record<string, any>;
3type IPlotCfg = {
4 plotType: string;
5 options: IOptions;
6};
7interface IAdapterProps {
8 /**
9 * 可覆盖组件displayName
10 */
11 chartName?: string;
12 /**
13 * options 转换器
14 * @example
15 * // 合并图表类型,或者做配置项转换
16 * (opt) => {
17 * const options = {
18 * // 可配置默认数据
19 * data: [...],
20 * ...opt,
21 * }
22 *
23 * return {
24 * plotType: opt.stackField ? 'StackColumn' : 'Column',
25 * options,
26 * }
27 * }
28 */
29 adapter?: (IOptions: any) => IPlotCfg;
30 [key: string]: any;
31}
32declare const PlotAdapter: React.FC<IAdapterProps>;
33export default PlotAdapter;