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
-`field` (string) - (required) a string representing the field name the cell corresponds to. For the header of the tree column the field is ""
29
36
-`value` (string | number | date) - (required) the value of a cell
30
37
-`area` - (required) a string indicating the area of the table where a cell resides ("rows", "columns" or "values" area)
31
-
-`method` string - (optional) a string that can represent the operation performed for a field from the "values` area (e.g., "sum", "count", etc.) or the name of a predicate set for a field from the "columns" area
38
+
-`method`(string) - (optional) a string that can represent the operation performed for a field from the "values` area (e.g., "sum", "count", etc.) or the name of a predicate set for a field from the "columns" area
32
39
-`isTotal` - (optional) defines whether a cell belongs to a total column
33
40
-`template` - (optional) defines the format of text in headers. By default, for the fields applied as rows the value of the `label` parameter is displayed and for the fields applied as values the label and method are shown (e.g., *Oil(count)*). The function takes the field id, label and the method or predicate id (if any) and returns the processed value. The default template is as follows:
34
41
~~~js
@@ -58,7 +65,7 @@ const table = new pivot.Pivot("#root", {
58
65
},
59
66
headerShape: {
60
67
vertical:true,
61
-
template: (label, field, subLabel) => field + (subLabel ?` (${subLabel})`:"")
68
+
template: (label, field, subLabel) => field + (subLabel ?` (${subLabel})`:""),
Copy file name to clipboardExpand all lines: docs/guides/localization.md
+3-8
Original file line number
Diff line number
Diff line change
@@ -267,20 +267,15 @@ To present the 20th of June, 2024 with the exact time as *2024-09-20 16:47:08.12
267
267
268
268
## Number formatting
269
269
270
-
By default, all fields with the *number* type are localized according to the locale (the value in the `lang` field of the locale). The [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) object enables language-sensitive number formatting. In case you need to set a custom format to a specific field, use the `format` parameter of the [`fields`](/api/config/fields-property) property. By default, the format for numeric values limits fraction digits to 3 and applies group separation for the integer part. The `format` parameter allows you to display numeric values without group separation (for example, years):
270
+
By default, all fields with the number type are localized according to the locale (the value in the `lang` field of the locale). Pivot uses [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) specification. By default the fraction digits are limited to 3 and group separation is applied for the integer part.
271
+
In case you do not need to format specific fields with numeric values or need to set a custom format, use the the `format` parameter of the [`fields`](/api/config/fields-property) property. It can be either *false* to cancel formatting or an object with format settings (refer to [Custom number formatting](/guides/custom-formatting/#custom-number-formatting)).
0 commit comments