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

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

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