---
order: 15
group:
  title: 文本
  order: 40
---

## 温度

可用来显示温度

```tsx
import React from 'react';
import * as Charts from 'edata-charts';

const props = {
  city:'杭州市',
};

export default () => (
   <div
    style={{ background: '#181B1D', width: '100%', height: 60, padding: 10 }}
  >
   <Charts.Temperature {...props} />
  </div>
  );

```

## API

| 参数       | 说明       | 类型   |
| ---------- | ---------- | ------ |
| size       | 容器的宽高 | object |
| city       | 城市       | string |
| boxStyle   | 样式       | object |
| iconWidth  | icon大小   | number |
| iconMargin  | icon与文字间距   | number |


### size

| 参数   | 说明 | 类型           |
| ------ | ---- | -------------- |
| width  | 宽度 | number\|string |
| height | 高度 | number\|string |

### boxStyle

| 参数       | 说明     | 类型   |
| ---------- | -------- | ------ |
| fontSize   | 字体大小 | number |
| fontFamily | 字体     | string |
| color      | 字体颜色 | string |
| fontWeight | 字体粗细 | string |