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
{{ message }}
This repository was archived by the owner on Feb 6, 2024. It is now read-only.
@@ -171,21 +173,15 @@ The `<deckgo-pie-chart/>` Web Component draw a Pie chart.
171
173
172
174
#### CSV
173
175
174
-
The csv file should contains one or two columns. The values could be provided as `number`or `percent`.
176
+
The csv file should contains at least two columns. The first one should be a label, which could be displayed or not, and the second one should be a value.
175
177
176
-
##### Single column
178
+
If more than two columns are provided, all columns beside the first one will be interpreted as values for comparison, in case you would like to displayed multiple graphs.
177
179
178
-
If a single column is used, it should contains the values.
180
+
The values could be provided as `number` or `percent`.
179
181
180
-
```
181
-
60
182
-
20
183
-
20
184
-
```
185
-
186
-
##### Two columns
182
+
##### Example
187
183
188
-
If two columns are provided, the first column should contains the description of the value.
184
+
In this example, the first column contains a label for the category and the second contains the value in percent.
189
185
190
186
```
191
187
Wind;53.13%
@@ -208,23 +204,45 @@ The `<deckgo-pie-chart/>` expose the following properties:
208
204
|`innerRadius`|`inner-radius`|| To plot a `donut` instead of a `pie`, provide an inner radius |`number`|`0`|
209
205
|`range`|`range`|| A list of custom colors which should be to draw the chart |`string[]`||
210
206
|`separator`|`separator`|| The line separator use in your csv file |`string`|`';'`|
207
+
|`animation`|`animation`|| Display multiple graphs and animate the transition between these |`boolean`|`false`|
208
+
|`animationDuration`|`animation-duration`|| Duration of the transition between graphs |`numer`|`1000` (aka 1 second) |
211
209
212
210
#### Styling
213
211
214
212
The `<deckgo-pie-chart/>` could be styled using the following CSS4 variables:
If you are using `animation`, this method is used to display the next data respectively the next chart.
225
235
226
236
```
227
-
draw() => Promise<void>
237
+
async next()
238
+
```
239
+
240
+
##### Previous
241
+
242
+
If you are using `animation`, this method is used to display the previous data respectively the previous chart.
243
+
244
+
```
245
+
async prev()
228
246
```
229
247
230
248
#### Examples
@@ -241,11 +259,13 @@ The `<deckgo-line-chart/>` Web Component draw a line chart.
241
259
242
260
#### CSV
243
261
244
-
The csv file should contains two or three columns.
262
+
The csv file should contains two or multiple columns.
245
263
246
264
The first column contains the values for the `x` axis. These should be provided as `date` or `number`.
247
265
248
-
The second and third columns contains the values for the `y` axis. These should be provided as `number`.
266
+
The second and other columns contains the values for the `y` axis. These should be provided as `number`.
267
+
268
+
Use multiple columns in case you would like to compare multiple graphs.
249
269
250
270
##### Two columns
251
271
@@ -265,9 +285,9 @@ With numbers as `x` axis:
265
285
3;8
266
286
```
267
287
268
-
##### Three columns
288
+
##### Three columns or more
269
289
270
-
The third columns is optional, it could be use in case you would like to plot two charts on the same graph.
290
+
The third columns or any others is optional, it could be use in case you would like to plot multiple charts on the same graph or animate a transition between these.
271
291
272
292
With dates as `x` axis:
273
293
@@ -305,6 +325,8 @@ The `<deckgo-line-chart/>` expose the following properties:
305
325
|`ticks`|`ticks`|| Specify the ticks of the axis |`number`| `` |
306
326
|`grid`|`grid`|| Draw a grid behin the graph |`boolean`|`false`|
307
327
|`separator`|`separator`|| The line separator use in your csv file |`string`|`';'`|
328
+
|`animation`|`animation`|| Display multiple graphs and animate the transition between these |`boolean`|`false`|
329
+
|`animationDuration`|`animation-duration`|| Duration of the transition between graphs |`numer`|`1000` (aka 1 second) |
308
330
309
331
#### Styling
310
332
@@ -313,25 +335,48 @@ The `<deckgo-line-chart/>` could be styled using the following CSS4 variables:
0 commit comments