未验证 提交 558623f4 编写于 作者: O openharmony_ci 提交者: Gitee

!8845 翻译完成 8652:ts-basic-components-gauge.md

Merge pull request !8845 from ester.zhou/TR-8652
# Gauge
> **NOTE**<br>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
> **NOTE**
>
> This component is supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
This component is used to create a data gauge chart widget that displays data in a ring chart.
The **\<Gauge>** component is used to display data in a ring chart.
## Required Permissions
......@@ -15,7 +16,7 @@ None
## Child Components
None
Not supported
## APIs
......@@ -23,28 +24,29 @@ None
Gauge(value:{value: number, min?: number, max?: number})
- Parameters
| Name | Type | Mandatory | Default Value | Description |
| Name| Type| Mandatory| Default Value| Description|
| -------- | -------- | -------- | -------- | -------- |
| value | number | Yes | - | Current data value. |
| min | number | No | 0 | Minimum value of the current data segment. |
| max | number | No | 100 | Maximum value of the current data segment. |
| value | number | Yes| - | Current data value.|
| min | number | No| 0 | Minimum value of the current data segment.|
| max | number | No| 100 | Maximum value of the current data segment.|
## Attributes
| Name | Type | Default Value | Description |
| Name| Type| Default Value| Description|
| -------- | -------- | -------- | -------- |
| value | number | 0 | Sets the value of the current data chart. |
| startAngle | Angle | -150 | Sets the start angle. Clock 0 indicates 0 degree, and the clockwise direction indicates the positive angle. |
| endAngle | Angle | 150 | Sets the end angle position. The clock 0 point is 0 degree, and the clockwise direction is the positive angle. |
| colors | Color \| Array&lt;ColorStop&gt; | - | Sets the color of the chart. You can set the pure color or segmental gradient color. |
| strokeWidth | Length | - | Sets the ring thickness of a ring chart. |
| value | number | 0 | Value of the chart.|
| startAngle | number | -150 | Start angle of the chart. The value 0 indicates 0 degrees, and a positive value indicates the clockwise direction.|
| endAngle | number | 150 | End angle of the chart. The value 0 indicates 0 degrees, and a positive value indicates the clockwise direction.|
| colors | Array&lt;any&gt; | - | Colors of the chart. Solid colors and gradients are supported.|
| strokeWidth | Length | - | Stroke width of the chart.|
## Example
```
```ts
// xxx.ets
@Entry
@Component
struct GaugeExample {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册