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
- grammar and wording fixes across API config/events/methods/table/internal docs
- guides and news pages polished for clarity
- rename update-value event to update-field (page and references)
- restore heading anchors in guides broken by renamed headings
Copy file name to clipboardExpand all lines: docs/api/config/columnshape-property.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,10 +19,10 @@ columnShape?: {
19
19
[field: string]: number
20
20
},
21
21
autoWidth?: {
22
-
columns?: {
22
+
columns: {
23
23
[field: string]: boolean
24
24
},
25
-
auto: boolean |"header"|"data",
25
+
auto?: boolean |"header"|"data",
26
26
maxRows?: number,
27
27
firstOnly?: boolean
28
28
}
@@ -34,9 +34,9 @@ columnShape?: {
34
34
-`sort` - (optional) if **true** (default), the sorting is enabled in UI by clicking the column header; if **false**, the sorting is disabled
35
35
-`width` - (optional) defines the width of a column; it's an object where each key is a field id and the value is the width of the column in pixels
36
36
-`autoWidth` - (optional) an object that defines how column width should be calculated automatically. The default configuration uses 20 rows, and the width is calculated based on the header and data, with each field analyzed only once. The object parameters are the following:
37
-
-`columns` - (optional) an object where each key is a field id and the boolean value defines whether column width should be calculated automatically
38
-
-`auto` - (required) if set to **header**, adjusts the width to the header text; if set to **data**, adjusts the width to the cell with the widest content; if set to **true**, the width is adjusted to the content of both headers and cell.
39
-
If autowidth is set to **false**, the `width` value is set or the value of the `columnWidth` from the [`tableShape`](/api/config/tableshape-property) property is applied.
37
+
-`columns` - (required) an object where each key is a field id and the boolean value defines whether column width should be calculated automatically
38
+
-`auto` - (optional) if set to **header**, adjusts the width to the header text; if set to **data**, adjusts the width to the cell with the widest content; if set to **true**, the width is adjusted to the content of both headers and cell.
39
+
If autowidth is set to **false**, the `width` value is set or the value of the `columnWidth` from the [`tableShape`](api/config/tableshape-property.md) property is applied.
40
40
-`maxRows` - (optional) the number of rows to be processed for the autoWidth calculation
41
41
-`firstOnly` - (optional) if set to **true** (default), each field of the same data is analyzed only once to calculate the column width; in case of multiple columns based on the same data (e.g., the *oil* field with the *count* operation and the *oil* field with the *sum* operation), only data in the first one will be analyzed and the others will inherit this width
Copy file name to clipboardExpand all lines: docs/api/config/config-property.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,14 +27,14 @@ The `config` parameters are used to define which fields will be applied as rows
27
27
28
28
-`rows` - (optional) defines the rows of the Pivot table. The default value is an empty array. It can be a string which represents a single field ID or an object with the field ID and a method for data extraction; the object parameters are the following:
29
29
-`field` - (required) the ID of a field
30
-
-`method` - (optional) defines a method for data aggregation in the field; methods for the time-based data fields are available by default: year, month, day, hour, minute which group data by year/month/day/hour; here you can also add the name of a custom method ([see `predicates`](/api/config/predicates-property)) for the field of any data type
30
+
-`method` - (optional) defines a method for data aggregation in the field; methods for the time-based data fields are available by default: "year", "quarter", "month", "week", "day", "hour", "minute" which group data accordingly; here you can also add the name of a custom method ([see `predicates`](api/config/predicates-property.md)) for the field of any data type
31
31
-`columns` - (optional) defines columns for the Pivot table. It's an empty array by default. It can be a single field ID or an object with the field ID and a method for data extraction; the object parameters are the following:
32
32
-`field` - (required) the ID of a field
33
33
-`method` - (optional) defines a method for data processing (for time-based data fields).
34
-
By default, methods are available for the time-based fields (the **date** type) with the next values: "year", "quarter", "month", "week", "day", "hour", "minute". Here you can also add the name of a custom method ([see `predicates`](/api/config/predicates-property)) for the field of any data type
34
+
By default, methods are available for the time-based fields (the **date** type) with the next values: "year", "quarter", "month", "week", "day", "hour", "minute". Here you can also add the name of a custom method ([see `predicates`](api/config/predicates-property.md)) for the field of any data type
35
35
-`values` - (optional) defines the data aggregation for the cells of the Pivot table. It's an empty array by default. Each element can be a string representing a data field ID and aggregation method or an object containing the field ID and the method for data aggregation. The object parameters are the following:
36
36
-`field` - (required) the ID of a field
37
-
-`method` - (required) defines a method for data extraction; for methods types and their description refer to [Applying methods](/guides/working-with-data#default-methods)
37
+
-`method` - (required) defines a method for data extraction; for methods types and their description refer to [Applying methods](guides/working-with-data.md#default-methods)
38
38
39
39
<details>
40
40
@@ -49,7 +49,7 @@ You can define `values` in either of the two equally valid ways:
49
49
~~~jsx
50
50
values: [
51
51
"sum(sales)", // option one
52
-
{ id:"sales", method:"sum" }, // option two
52
+
{ field:"sales", method:"sum" }, // option two
53
53
]
54
54
~~~
55
55
@@ -78,7 +78,7 @@ values: [
78
78
-`includes` - (optional) an array of values to be displayed from those that are already filtered; available for text and dates values
79
79
80
80
:::info
81
-
When config is processed by Pivot, its properties receive extra data and if you try to return the config state via the [`api.getState()`](/api/internal/getstate-method) method, the full object will look like this:
81
+
When config is processed by Pivot, its properties receive extra data and if you try to return the config state via the [`api.getState()`](api/internal/getstate-method.md) method, the full object will look like this:
Copy file name to clipboardExpand all lines: docs/api/config/fields-property.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,21 +32,21 @@ Each object in the `fields` array should have the following properties:
32
32
33
33
-`id` - (required) the ID of a field
34
34
-`label` - (optional) the field label to be displayed in GUI
35
-
-`type` - (required) data type in a field ( "number", "date", or "string")
35
+
-`type` - (required) data type in a field ( "number", "date", or "text")
36
36
-`sort` - (optional) defines the default sorting order for the field. Accepts "asc", "desc", or a custom sorting function
37
-
-`format` - (optional) allows customizing the format of numbers and dates in a field; the format will be also applied during [export](/guides/exporting-data)
37
+
-`format` - (optional) allows customizing the format of numbers and dates in a field; the format will be also applied during [export](guides/exporting-data.md)
38
38
-`string` - (optional) the format for dates (by default, Pivot uses `dateFormat` from locale)
39
39
-`boolean` - (optional) if set to **false**, a number is displayed as is, without any formatting
40
40
-`numberFormatOptions` - (optional) an object with options for formatting numeric fields; by default, numbers will be shown with a maximum of 3 decimal digits and group separation for the integer part is applied.
41
41
-`minimumIntegerDigits`(number) - (optional) the minimum number of integer (for example, if the value is set to 2, the number 1 will be shown as "01"); the default is 1;
42
-
-`minimumFractionDigits`(number) - (optional) the minimum number of fraction digits to use (for example, if the value is set to 2, the number 10.5 will be shown as "10.50"); the default is 1;
42
+
-`minimumFractionDigits`(number) - (optional) the minimum number of fraction digits to use (for example, if the value is set to 2, the number 10.5 will be shown as "10.50"); the default is 0;
43
43
-`maximumFractionDigits`(number) - (optional) the maximum number of fraction digits to use (for example, if the value is set to 2, the number 10.3333... will be shown as "10.33"); the default is 3;
44
44
For more details about digit options refer to [Digit options](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#minimumintegerdigits)
45
45
-`prefix` (string) - (optional) a string (before a number) for additional symbols like currency
46
46
-`suffix` (string) - (optional) a string (after a number) for additional symbols like currency
47
47
48
48
:::info
49
-
If a template is applied via the [`tableShape`](/api/config/tableshape-property) property, it will override the `format` settings.
49
+
If a template is applied via the [`tableShape`](api/config/tableshape-property.md) property, it will override the `format` settings.
50
50
:::
51
51
52
52
### Example
@@ -106,7 +106,7 @@ const table = new pivot.Pivot("#root", {
Copy file name to clipboardExpand all lines: docs/api/config/predicates-property.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,12 +41,14 @@ The property is an object where a key is the name of a custom function and value
41
41
-`type` - (optional) defines which field type will be applied: "number"|"text"|"date"|"tuple". "tuple" is a combo filter applied for numeric values (data will be filtered by the numeric value but in filter the text value will be displayed)
42
42
-`format` - (optional) the function that defines the format for displaying filter options; if no format is defined, the one from the template parameter will be applied; if the type here (for the `filter` object) is not specified, the format will be applied for the type set for the `type` parameter of the predicate
43
43
-`handler` - (required for custom predicates) the function that defines how data should be processed; the function should take a single argument as the value to be processed and return the processed value
44
-
-`template` - (optional) the function that defines how data should be displayed; the function returns the processed value and it takes the value returned by `handler` and if necessary you can localize text values using [`locale`](/api/config/locale-property).
44
+
-`template` - (optional) the function that defines how data should be displayed; the function returns the processed value and it takes the value returned by `handler` and if necessary you can localize text values using [`locale`](api/config/locale-property.md).
45
45
46
46
The following default predicates are applied in case no predicate is specified via the `predicates` property:
47
47
48
48
~~~jsx
49
49
constdefaultPredicates= {
50
+
// a service predicate that represents the raw (unprocessed) value
Copy file name to clipboardExpand all lines: docs/api/config/tableshape-property.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ tableShape?: {
54
54
-`templates` - (optional) allows setting templates to a cell; it's an object where:
55
55
- each key is a field id
56
56
- the value is a function that returns a string and receives cell value and operation. All columns based on the specified field will have the related template applied. For example, it allows setting the units of measurement or returning the required number of digits after the decimal point for numeric values, etc. See the example below.
57
-
-`marks` - (optional) allows marking a cell with the required values. It's an object where keys are CSS class names and values are either a function or one of the predefined strings ("max", "min"). The function should return boolean for the checked value. If **true** is returned, the css class is assigned to the cell. More information with examples see here [Marking cells](/guides/stylization#cell-style).
57
+
-`marks` - (optional) allows marking a cell with the required values. It's an object where keys are CSS class names and values are either a function or one of the predefined strings ("max", "min"). The function should return boolean for the checked value. If **true** is returned, the css class is assigned to the cell. More information with examples see here [Marking cells](guides/stylization.md#cell-style).
58
58
-`sizes` - (optional) defines the following size parameters of the table:
59
59
-`rowHeight` - (optional) the row height in the Pivot table in pixels. The default value is 34
60
60
-`headerHeight` - (optional) the header height in pixels; the default value is 30
@@ -67,12 +67,12 @@ tableShape?: {
67
67
-`method` - (optional) a string that can represent the operation performed on a cell (e.g., "sum", "count", etc.)
68
68
-`isTotal` - (optional) defines whether a cell belongs to a total row, total column, or both: "row"|"column"|"both
69
69
The `cellStyle` function returns a string, which can be used as a CSS class name to apply specific styles to a cell.
70
-
-`tree` - (optional) if set to **true**, enables the tree mode when data can be presented with expandable rows, the default value is **false**. More information with examples see here [Switching to the tree mode](/guides/configuration/#enabling-the-tree-mode)
70
+
-`tree` - (optional) if set to **true**, enables the tree mode when data can be presented with expandable rows, the default value is **false**. More information with examples see here [Switching to the tree mode](guides/configuration.md#enabling-the-tree-mode)
71
71
-`totalColumn` - (optional) if **true**, enables generating the total column with total values for rows (**false** is set by default). If the value is set to "sumOnly", the column with the total sum value will be generated (available only for sum operations)
72
72
-`totalRow` - (optional) if **true**, enables generating the footer with total values (**false** is set by default). If the value is set to "sumOnly", the row with the total row value will be generated (available only for sum operations)
73
73
-`cleanRows` - (optional) if set to **true**, the duplicate values in scale columns are hidden in the table view. The default value is **false**
74
-
-`split` - (optional) allows freezing columns on the right or left depending on the parameter specified (refer to [Freezing columns](/guides/configuration/#freezing-columns)):
75
-
-`left` (boolean) - if set to **true** (**false** is set by default), fixes the columns from the left, which makes columns static and visible while scrolling. The number of columns that are split is equal to the number of the rows fields that are defined in the [`config`](/api/config/config-property) property
74
+
-`split` - (optional) allows freezing columns on the right or left depending on the parameter specified (refer to [Freezing columns](guides/configuration.md#freezing-columns)):
75
+
-`left` (boolean) - if set to **true** (**false** is set by default), fixes the columns from the left, which makes columns static and visible while scrolling. The number of columns that are split is equal to the number of the rows fields that are defined in the [`config`](api/config/config-property.md) property
76
76
-`right` (boolean) - fixes total columns on the right; default value is **false**
77
77
78
78
By default, `tableShape` is undefined, implying that no total row, no total column is present, no templates and marks are applied, the data is shown as a table and not a tree, and columns are not fixed during scroll.
@@ -124,8 +124,8 @@ const table = new pivot.Pivot("#root", {
0 commit comments