---
title: API
order: 3
---
<br/>

| 参数名         | 说明        | 必填 | 类型                                                             | 默认值 | 备注 |
|----------------|-----------|------|------------------------------------------------------------------|--------|------|
| title          | 图表标题    | Y    | React.ReactNode                                                  | -      |      |
| dataSource     | 数据项      | Y    | [dataSource](#datasource)                                        | -      |      |
| options        | options配置 | Y    | [EChartOption ](https://echarts.apache.org/zh/option.html#title) | -      |      |
| className      | 类名        | N    | String                                                           | -      |      |
| universalStyle | 通用样式    | N    | [UniversalStyle](#universalstyle)                                | -      |      |


### UniversalStyle

```typescript
type UniversalStyle = {
  width?: string | number;
  height?: string | number;
  position?: {
    x: string | number;
    y: string | number;
  };
  rotation?: number;
  opacity?: number;
  backgroundColor?: string;
};
```

### dataSource

```typescript
  dataSource: {
    name: string;
    value: number;
  }[];
```
