You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-33
Original file line number
Diff line number
Diff line change
@@ -152,9 +152,8 @@ The **[`progress`](#progress)** is the only required property and you are ready
152
152
###### Animated: ✔️
153
153
154
154
Is any Number in range \[-100, 100] (including **decimals**). This property defines the filled area from progress circle line in
155
-
percent. `progress` is animated and counts up or down on any value changes with duration defined in
156
-
**[`animation.duration`](#animation)** property. The progress is shown by default as the **legend** in the middle of the circle.
157
-
Set a negative value to fill the progress counterclockwise. Alternative you can use [`reverse`](#reverse).
155
+
percent and is shown by default as the **legend** in the middle of the circle. `progress` is animated and counts up or down on any value changes with duration defined in
156
+
**[`animation.duration`](#animation)** property. Set a negative value to fill the progress line counterclockwise. Alternatively [`reverse`](#reverse) can be used.
158
157
159
158
###### Example: 📜
160
159
@@ -165,11 +164,10 @@ this.myProgress = 55.5;
165
164
this.myProgress=this.tasksDone*100/ maxTasks; // the percentage of done tasks
166
165
```
167
166
168
-
>❗ The `progress` is always used to fill the progress circle line. So you cannot customize this
169
-
>value, it should be always in the range [-100, 100] and not valid Numbers lead to **[`noData`](#noData)** state.
167
+
>❗ The `progress` is always used to fill the progress circle line, it should be always in the range [-100, 100] and not valid Numbers lead to **[`noData`](#noData)** state.
170
168
>For customization purpose please use **[`legend`](#legend)** and take a look at **[`legendFormatter`](#legendformatter)**.
171
169
172
-
>❗ If **[`legend`](#legend)** is defined the progress will **NOT** be displayed as circle legend.
170
+
>❗ If **[`legend`](#legend)** is defined the `progress` will **not** be displayed as circle legend.
173
171
174
172
<br>
175
173
@@ -189,7 +187,7 @@ circle depends on the properties **[`lineMode`](#linemode)**, **[`thickness`](#t
189
187
190
188
###### Animated: ✔️
191
189
192
-
Is a string value from `round | square | butt`. Defines the progress circle line cap. Internally is used the CSS property `stroke-linecap`.
190
+
Is a String value from `round | square | butt`. Defines the progress circle line cap. Internally the CSS property `stroke-linecap` is used.
193
191
194
192
###### Example: 📜
195
193
@@ -203,8 +201,7 @@ Is a string value from `round | square | butt`. Defines the progress circle line
203
201
204
202
###### Animated: ✔️
205
203
206
-
Is a number >=0 or a string to define a percent value. It defines the progress line thickness.
207
-
If you set the value in percent as string, the thickness will be calculated in relation to **[`size`](#size)**.
204
+
Is a Number >=0 or a String that defines the progress line thickness. If you set the value in percent as String, the thickness will be calculated in relation to **[`size`](#size)**.
208
205
209
206
###### Example: 📜
210
207
@@ -219,16 +216,15 @@ If you set the value in percent as string, the thickness will be calculated in r
219
216
220
217
###### Animated: ✔️
221
218
222
-
Is a number >=0 or a string to define a percent value.
223
-
It defines the empty circle line thickness. If you define the value in percent, thickness will be calculated in relation to **[`size`](#size)**.
219
+
Is a Number >=0 or a String. It defines the empty circle line thickness. If you set the value in percent, thickness will be calculated in relation to **[`size`](#size)**.
224
220
225
221
<br>
226
222
227
223
-### `lineMode`
228
224
229
225
###### Animated: ✔️
230
226
231
-
Descriptive string in form `"mode [offset]"` that defines how the progress line is aligned in relation to empty line.
227
+
Descriptive string in form `"mode [offset]"` that defines, how the progress line is aligned in relation to empty line.
232
228
The first value ist the `mode` and the optional second is the `offset`. You can understand the modes as the presets that
233
229
help you to align lines as you want to.
234
230
@@ -254,7 +250,7 @@ help you to align lines as you want to.
254
250
-`top`: the progress line is aligned at the top of the empty line
-`offset`: is any negative or positive number and defines the distance between the progress and empty lines. It can be **only** combined with the `in` and `out` modes
253
+
-`offset`: is any negative or positive Number and defines the distance between the progress and empty lines. It can be **only** combined with the `in` and `out` modes
258
254
259
255
###### Example: 📜
260
256
@@ -264,7 +260,7 @@ Let's take a look at few examples:
As you can see the second and fourth examples are similar to the modes `bottom` and `top`. Only with the modes `in` and `out` and the`offset` you can achieve the same result. But the provided modes like a presets take care about annoying calculations and do the job for you.
263
+
In general, any positioning can already be achieved with values `in` and `out` in a combination with certain`offset`. The modes, however, act like presets, which reduce the effort for the manuall calculations.
268
264
269
265
<br>
270
266
@@ -273,7 +269,7 @@ As you can see the second and fourth examples are similar to the modes `bottom`
273
269
274
270
###### Animated: ✔️
275
271
276
-
Descriptive string in form `"mode [offset]"` that defines how the progress line is aligned in relation to the fill area.
272
+
Descriptive string in form `"mode [offset]"` that defines how the progress line is aligned in relation to the cirlce fill area.
277
273
Available modes are `center`, `in` and `out`. Additionally, with the `out` mode you can provide an `offset` value as any Number.
278
274
In general, this prop makes it possible to mimic the SVG2 `stroke-aligment`, which is currently not supported in any browser.
279
275
@@ -300,12 +296,12 @@ The usage is similar to [linePosition](#lineposition).
300
296
301
297
###### Animated: ✔️
302
298
303
-
Defines the color of progress circle **line**. Is any CSS color like `#123` or `lime` or an object that defines the gradient.
299
+
Defines the color of progress circle line. Is any CSS color like `#123` or `lime` or an object that defines the gradient.
304
300
305
301
-`color="#3f79ff"` - as String
306
302
307
303
-`:color="{ colors [, radial ]}"` - as Object
308
-
-`radial` - default `false`. Defines whether the gradient is radial or linear
304
+
-`radial` - default `false`. Boolean that defines, whether the gradient is radial or linear
309
305
-`colors` - array that contains the gradient colors as objects `{ color: "#6546f7", offset: "10" [, opacity: 1] }`
310
306
311
307
###### Example: 📜
@@ -358,7 +354,7 @@ Defines the fill color of the empty circle. Takes the same value as **[`color`](
358
354
359
355
-### `hideLegend`
360
356
361
-
Boolean value that defines whether the **[`progress`](#progress)** or from you defined **[`legend`](#legend)** is displayed as the legend of the circle.
357
+
Boolean that defines whether the legend value (**[`progress`](#progress)** or **[`legend`](#legend)**) is hidden.
362
358
363
359
<br>
364
360
@@ -398,24 +394,24 @@ Now you can display custom progress value that still animated and circle progres
398
394
-### `legendFormatter`
399
395
400
396
Is a Function that must return your custom formatted value. The function takes counter properties object as argument and
401
-
is called on every tick of the counter. Here the formatting of [legend](#legend) or [progress](#progress)
402
-
is completely up to you and you have full freedom to adjust the presentation to your needs. The function can return any
397
+
is called on every counter tick. Here the formatting of [legend](#legend) or [progress](#progress)
398
+
is completely up to you and you have the full freedom to adjust the presentation to your needs. The function can return any
403
399
value, even HTML.
404
400
405
401
>❕ alternatively you can use **[`scoped slot`](#default)** for custom formatting.
406
402
407
403
###### Example: 📜
408
404
409
-
Let's see how it works. The function takes counter properties object as argument that you can use to define custom formatting.
405
+
The function takes counter properties Object as argument that you can use to define custom formatting.
410
406
`currentValue` is the most relevant value, as it is the actual value at specific counter tick. The return value will be
@@ -429,15 +425,15 @@ Finally, set your formatter as prop:
429
425
430
426
```vue
431
427
<ve-progress :legend-formatter="myFormatter"/>
432
-
<!-- shorter version if you wish-->
428
+
<!-- shorter version-->
433
429
<ve-progress :legend-formatter="({ currentValue }) => `My Format ${currentValue}`"/>
434
430
````
435
431
436
432
<br>
437
433
438
434
- ### `animation`
439
435
440
-
Descriptive string in form `"type [duration delay]"` that defines the initial animation of progress circle line filling. `type` is one from predefined animations and the optional `duration` and `delay` are number values. Note that the order is important and that you can only define the `delay` after `duration`.
436
+
Descriptive string in form `"type [duration delay]"` that defines the initial animation of progress circle line filling. `type` is one from predefined animations and the optional `duration` and `delay` are Number values. Note that the order is important and that you can only define `delay` after `duration`.
441
437
442
438
- `type` - is one of the predefined animations: `default | rs | reverse | bounce| loop`
443
439
- `duration` - number in milliseconds, default `1000`
@@ -454,7 +450,7 @@ animation="bounce 1000"
454
450
455
451
-### `loading`
456
452
457
-
Forces loading state. The component provides an indeterminate loading state for the case that your data is not available immediately. With this property set to `true` you can use the component as the indeterminate progress.
453
+
Boolean that forces loading state. The component provides an indeterminate loading state for the case that your data is not available immediately. With this property set to `true` you can use the component as the indeterminate progress.
458
454
459
455
<br>
460
456
@@ -474,15 +470,15 @@ With this option defined as Object you can customize the loading circle that is
474
470
475
471
-### `determinate`
476
472
477
-
Provides a determinate loading state that indicates that your data loading is still in progress but allows to show the **[`progress`](#progress)**.
473
+
Boolean that provides a determinate loading state that indicates that your data loading is still in progress but allows to show the **[`progress`](#progress)**.
478
474
479
475
<br>
480
476
481
477
-### `noData`
482
478
483
479
###### Animated: ✔️
484
480
485
-
Forces no data state. The component provides a no data state for the case that your data is not available. The circle progress is still empty.
481
+
Boolean that forces no data state. The component provides a no data state for the case that your data is not available. The circle progress is still empty.
486
482
487
483
>❗ The component will take the no data state even if you provide an invalid **[`progress`](#progress)** value
488
484
@@ -525,15 +521,15 @@ Adds class to the circles legend to give you the possibility to style it.
525
521
Descriptive string in form `"[strict] count spacing"` that adds dashed empty progress line. This property provides the optional `strict` mode. In this mode you can define the explicit number of dashes as `count` with the given relative `spacing` as number in range >= 0 and < 1. Without `strict` the default behavior of the SVG `stroke-dasharray` property is used, where the size and spacings of the dashes are defined.
526
522
527
523
###### Example: 📜
528
-
`dash="strict 60 0.5"` - 60 dashes with 0.5 relative spacing
`dash="10 10"` - 10 pixels big dashes with 10 pixels spacing, the number of dashes depends on the empty circle circumference
526
+
`<ve-progress dash="10 10" />` - 10 pixels big dashes with 10 pixels spacing, the number of dashes depends on the empty circle circumference
531
527
532
528
<br>
533
529
534
530
-### `half`
535
531
536
-
Boolean value that specifies the type of the circle. If it is set to true, only the half of the circle will be drawn.
532
+
Boolean that specifies the type of the circle. If it is set to true, only the half of the circle will be drawn.
537
533
538
534
###### Example: 📜
539
535
```vue
@@ -590,7 +586,7 @@ dot="5% red" // adds red dot
590
586
591
587
-### `reverse`
592
588
593
-
Is a Boolean. `reverse` prop flips the circle, and the progress circle fills counterclockwise. Alternative you can just set
589
+
Is a Boolean. `reverse` prop flips the circle, and the progress circle fills counterclockwise. Alternatively you can just set
594
590
a negative value for [`progress`](#progress).
595
591
596
592
###### Example: 📜
@@ -603,7 +599,7 @@ a negative value for [`progress`](#progress).
603
599
604
600
-### `data`
605
601
606
-
You can specify 2 or more circles as objects in an array as `data`. For each circle you can use almost every available property. It is not necessary to specify all properties, they will be merged with global props and the specified props will overwrite the global. The circles are rendered inside each other.
602
+
You can specify 2 or more circles as Objects in an array as `data`. For each circle you can use almost every available property. It is not necessary to specify all properties, they will be merged with global props and the specified props will overwrite the global. The circles are rendered inside each other.
607
603
608
604
>❗ Excluded props: **[`lineMode`](#lineMode)**, **[`emptyThickness`](#emptyThickness)**, **[`legend`](#legend)**. These properties will be ignored, if `data` is specified. The legend of this circle is also not shown.
0 commit comments