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
The sorting functionality is enabled by default. A user can click the column's header to sort data. To disable/enable sorting, apply the `sort` parameter of the [`columnShape`](/api/config/columnshape-property) property. In the example below we disable sorting.
218
+
219
+
~~~jsx {19}
220
+
constpivotWidget=newpivot.Pivot("#pivot", {
221
+
fields,
222
+
data,
223
+
config: {
224
+
rows: ["studio", "genre"],
225
+
columns: [],
226
+
values: [
227
+
{
228
+
field:"title",
229
+
method:"count",
230
+
},
231
+
{
232
+
field:"score",
233
+
method:"max",
234
+
},
235
+
],
236
+
},
237
+
columnShape: {
238
+
sort:false,
239
+
},
240
+
});
241
+
~~~
242
+
243
+
For more information about sorting data, refer to [Sorting data](/guides/working-with-data#sorting-data).
244
+
245
+
### Enabling the tree mode
216
246
217
247
The widget allows presenting data in a hierarchical format with expandable rows. To switch to the tree mode, apply the `tree` parameter of the [`tableShape`](/api/config/tableshape-property) property by setting its value to **true** (default is **false**).
218
248
To specify the parent row, put its name first in the `rows` array of the [`config`](/api/config/config-property) property.
@@ -357,36 +387,7 @@ const widget = new pivot.Pivot("#pivot", {
357
387
});
358
388
~~~
359
389
360
-
### Setting date format
361
-
362
-
tbd!
363
-
Pivot uses the following characters for setting the date format:
The Pivot accepts a date that is parsed into the Date object. By default, the `dateFormat` of the current locale is applied. To redefine the format, change the value of the `dateFormat` property in the **Locale** tag.
308
308
309
+
Example:
310
+
311
+
to be added
312
+
309
313
Pivot uses the following characters for setting the date format:
310
314
311
315
| Character | Definition |Example |
@@ -332,6 +336,4 @@ Pivot uses the following characters for setting the date format:
332
336
333
337
To present the 20th of June, 2024 with the exact time as *2024-09-20 16:47:08.128*, specify "%Y-%m-%d-%H:%i:%s.%u".
Copy file name to clipboardExpand all lines: docs/guides/working-with-data.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ const widget = new pivot.Pivot("#pivot", {
58
58
59
59
## Sorting data
60
60
61
-
The widget API allows configuring sorting settings and the sorting is applied to all areas (values, columns and rows) during aggregation. The sorting in UI is enabled by clicking the column header.
61
+
The widget API allows configuring the sorting settings that are applied applied to all areas (values, columns and rows) during aggregation. The sorting in UI is enabled by clicking the column header.
62
62
63
63
To set default sorting values, apply the **sort** parameter of the [`fields`](/api/properties/fields-property) property. It accepts either the "asc" or "desc" value, or a custom sorting function.
64
64
@@ -120,7 +120,7 @@ const widget = new pivot.Pivot("#pivot", {
120
120
});
121
121
~~~
122
122
123
-
To make the sorting possible in UI by clicking the column header, apply the `sort` parameter of the [`columnShape`](/api/config/columnshape-property) property. In the example below we disable sorting.
123
+
The sorting functionality is enabled by default. A user can click the column's header to sort data. To disable/enable sorting, apply the `sort` parameter of the [`columnShape`](/api/config/columnshape-property) property. In the example below we disable sorting.
0 commit comments