Skip to content

Commit e690398

Browse files
authored
docs: statistic 英文文档完善 (#2423)
1 parent 9ce38a4 commit e690398

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

docs/api/plots/gauge.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Gauage
2+
title: Gauge
33
order: 5
44
---
55

docs/common/statistic.en.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
| Properties | Type | Description |
22
| ---------- | ---------------------- | ----------- |
3-
| title | false \| StatisticText | title |
4-
| content | false \| StatisticText | content |
3+
| title | _false \| StatisticText_ | title |
4+
| content | _false \| StatisticText_ | content |
55

66
StatisticText
77

88
| Properties | Type | Description |
99
| ---------- | -------- | --------------------------------- |
10-
| style | object | Styles for statistical text |
11-
| formatter | Function | The formatted content of the text |
12-
| rotate | number | Rotation Angle |
13-
| offsetX | number | X offset |
14-
| offsetY | number | Y offset |
10+
| style | _CSSStyleDeclaration_ | Styles for statistical text (css styles) |
11+
| customHtml | `(container: HTMLElement, view: View, datum: object, data: object[]) => string;` | custom content by using html,priority is higher than formatter |
12+
| formatter | _Function_ | The formatted content of the text |
13+
| rotate | _number_ | Rotation Angle |
14+
| offsetX | _number_ | X offset |
15+
| offsetY | _number_ | Y offset |

docs/common/statistic.zh.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
| 配置项 | 类型 | 描述 |
22
| ------- | ---------------------- | -------- |
3-
| title | false \| StatisticText | 标题 |
4-
| content | false \| StatisticText | 主体内容 |
3+
| title | _false \| StatisticText_ | 标题 |
4+
| content | _false \| StatisticText_ | 主体内容 |
55

66
StatisticText
77

88
| 配置项 | 类型 | 描述 |
99
| --------- | -------- | -------------------- |
10-
| style | CSSStyleDeclaration | 统计文本的样式 (css 样式) |
10+
| style | _CSSStyleDeclaration_ | 统计文本的样式 (css 样式) |
1111
| customHtml | `(container: HTMLElement, view: View, datum: object, data: object[]) => string;` | 自定义主体文本的 html,优先级高于 formatter |
12-
| formatter | Function | 主体文本的格式化内容 |
13-
| rotate | number | 旋转角度 |
14-
| offsetX | number | X 偏移值 |
15-
| offsetY | number | Y 偏移值 |
12+
| formatter | _Function_ | 主体文本的格式化内容 |
13+
| rotate | _number_ | 旋转角度 |
14+
| offsetX | _number_ | X 偏移值 |
15+
| offsetY | _number_ | Y 偏移值 |

examples/progress-plots/gauge/demo/basic.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ const gauge = new Gauge('container', {
3030
statistic: {
3131
content: {
3232
formatter: ({ percent }) => `Rate: ${(percent * 100).toFixed(0)}%`,
33-
},
34-
style: {
35-
fontSize: 60,
33+
style: {
34+
color: 'rgba(0,0,0,0.65)',
35+
fontSize: 48,
36+
},
3637
},
3738
},
3839
});

0 commit comments

Comments
 (0)