Skip to content

Commit 9457d28

Browse files
authored
docs: corrections
1 parent a447cd3 commit 9457d28

File tree

1 file changed

+29
-33
lines changed

1 file changed

+29
-33
lines changed

README.md

+29-33
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,8 @@ The **[`progress`](#progress)** is the only required property and you are ready
152152
###### Animated: ✔️
153153

154154
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.
158157

159158
###### Example: 📜
160159

@@ -165,11 +164,10 @@ this.myProgress = 55.5;
165164
this.myProgress = this.tasksDone * 100 / maxTasks; // the percentage of done tasks
166165
```
167166

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.
170168
>For customization purpose please use **[`legend`](#legend)** and take a look at **[`legendFormatter`](#legendformatter)**.
171169
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.
173171
174172
<br>
175173

@@ -189,7 +187,7 @@ circle depends on the properties **[`lineMode`](#linemode)**, **[`thickness`](#t
189187

190188
###### Animated: ✔️
191189

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.
193191

194192
###### Example: 📜
195193

@@ -203,8 +201,7 @@ Is a string value from `round | square | butt`. Defines the progress circle line
203201

204202
###### Animated: ✔️
205203

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)**.
208205

209206
###### Example: 📜
210207

@@ -219,16 +216,15 @@ If you set the value in percent as string, the thickness will be calculated in r
219216

220217
###### Animated: ✔️
221218

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)**.
224220

225221
<br>
226222

227223
- ### `lineMode`
228224

229225
###### Animated: ✔️
230226

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.
232228
The first value ist the `mode` and the optional second is the `offset`. You can understand the modes as the presets that
233229
help you to align lines as you want to.
234230

@@ -254,7 +250,7 @@ help you to align lines as you want to.
254250
- `top`: the progress line is aligned at the top of the empty line
255251
<img width="100" height="35" src="https://github.com/setaman/Bilder/blob/master/ellipse-top.png">
256252

257-
- `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
258254

259255
###### Example: 📜
260256

@@ -264,7 +260,7 @@ Let's take a look at few examples:
264260
|----------|--------|---------|---------|
265261
| <img width="100" height="100" src="https://github.com/setaman/Bilder/blob/master/ellipse-exmp1.png">|<img width="100" height="100" src="https://github.com/setaman/Bilder/blob/master/ellipse-exmp2.png">|<img width="100" height="100" src="https://github.com/setaman/Bilder/blob/master/ellipse-exmp3.png">|<img width="100" height="100" src="https://github.com/setaman/Bilder/blob/master/ellipse-exmp4.png"> |
266262

267-
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.
268264

269265
<br>
270266

@@ -273,7 +269,7 @@ As you can see the second and fourth examples are similar to the modes `bottom`
273269

274270
###### Animated: ✔️
275271

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.
277273
Available modes are `center`, `in` and `out`. Additionally, with the `out` mode you can provide an `offset` value as any Number.
278274
In general, this prop makes it possible to mimic the SVG2 `stroke-aligment`, which is currently not supported in any browser.
279275

@@ -300,12 +296,12 @@ The usage is similar to [linePosition](#lineposition).
300296

301297
###### Animated: ✔️
302298

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.
304300

305301
- `color="#3f79ff"` - as String
306302

307303
- `: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
309305
- `colors` - array that contains the gradient colors as objects `{ color: "#6546f7", offset: "10" [, opacity: 1] }`
310306

311307
###### Example: 📜
@@ -358,7 +354,7 @@ Defines the fill color of the empty circle. Takes the same value as **[`color`](
358354

359355
- ### `hideLegend`
360356

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.
362358

363359
<br>
364360

@@ -398,24 +394,24 @@ Now you can display custom progress value that still animated and circle progres
398394
- ### `legendFormatter`
399395

400396
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
403399
value, even HTML.
404400

405401
>❕ alternatively you can use **[`scoped slot`](#default)** for custom formatting.
406402
407403
###### Example: 📜
408404

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.
410406
`currentValue` is the most relevant value, as it is the actual value at specific counter tick. The return value will be
411407
displayed as the legend of the circle.
412408

413409
```js
414-
const myFormatter = ({ currentValue, currentRawValue, duration, previousCountStepValue, start, end, difference, oneStepDifference, startTime, elapsed }) => {
410+
const myFormatter = ({ currentValue, ...otherProps }) => {
415411
return new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(currentValue);
416412
}
417413
```
418-
You can also return HTML:
414+
The funtion can also return HTML:
419415
```js
420416
const myFormatter = ({ currentValue }) => {
421417
return `
@@ -429,15 +425,15 @@ Finally, set your formatter as prop:
429425

430426
```vue
431427
<ve-progress :legend-formatter="myFormatter"/>
432-
<!-- shorter version if you wish-->
428+
<!-- shorter version-->
433429
<ve-progress :legend-formatter="({ currentValue }) => `My Format ${currentValue}`"/>
434430
````
435431
436432
<br>
437433
438434
- ### `animation`
439435
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`.
441437
442438
- `type` - is one of the predefined animations: `default | rs | reverse | bounce| loop`
443439
- `duration` - number in milliseconds, default `1000`
@@ -454,7 +450,7 @@ animation="bounce 1000"
454450

455451
- ### `loading`
456452

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.
458454

459455
<br>
460456

@@ -474,15 +470,15 @@ With this option defined as Object you can customize the loading circle that is
474470

475471
- ### `determinate`
476472

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)**.
478474

479475
<br>
480476

481477
- ### `noData`
482478

483479
###### Animated: ✔️
484480

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.
486482

487483
>❗ The component will take the no data state even if you provide an invalid **[`progress`](#progress)** value
488484
@@ -525,15 +521,15 @@ Adds class to the circles legend to give you the possibility to style it.
525521
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.
526522

527523
###### Example: 📜
528-
`dash="strict 60 0.5"` - 60 dashes with 0.5 relative spacing
524+
`<ve-progress dash="strict 60 0.5" />` - 60 dashes with 0.5 relative spacing
529525

530-
`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
531527

532528
<br>
533529

534530
- ### `half`
535531

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.
537533

538534
###### Example: 📜
539535
```vue
@@ -590,7 +586,7 @@ dot="5% red" // adds red dot
590586

591587
- ### `reverse`
592588

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
594590
a negative value for [`progress`](#progress).
595591

596592
###### Example: 📜
@@ -603,7 +599,7 @@ a negative value for [`progress`](#progress).
603599

604600
- ### `data`
605601

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.
607603

608604
>❗ 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.
609605

0 commit comments

Comments
 (0)