TimelineHistogramGrouping
Configs
217
Configs
217Common
Parent histogram data collecting
A function used for aggregating child records histogram data entries to their parent entry.
It's called for each child entry and is meant to apply the child entry values to the
target parent entry (provided in aggregated parameter).
The function must return the resulting aggregated entry that will be passed as aggregated
parameter to the next aggregating step.
Should be provided as a function, or name of a function in the ownership hierarchy which may be called.
| Parameter | Type | Description |
|---|---|---|
aggregateDataEntry.aggregated | Object | Target parent data entry to aggregate the entry into. |
aggregateDataEntry.entry | Object | Current entry to aggregate into |
aggregateDataEntry.arrayIndex | Number | Index of current array (index of the record among other records being aggregated). |
aggregateDataEntry.entryIndex | Object[] | Index of |
Return value becomes the value of the aggregated parameter on the next invocation of this function.
When true the component will automatically calculate data for group records
based on the groups members data by calling getGroupRecordHistogramData method.
Function that extracts a record histogram data entry for aggregating. By default it returns the entry as is. Override the function if you need a more complex way to retrieve the value for aggregating.
Should be provided as a function, or the name of a function in the ownership hierarchy which may be called.
| Parameter | Type | Description |
|---|---|---|
getDataEntryForAggregating.entry | Object | Current data entry. |
Entry to aggregate
A function that initializes a target group record entry.
Should be provided as a function, or name of a function in the ownership hierarchy which may be called.
Target aggregated entry
Content
CSS
Dates
DOM
Float & align
Layout
Masking
misc
Misc
Other
Scheduled events
State
Time axis
Tree
Zoom
Properties
193
Properties
193Common
Class hierarchy
CSS
Dates
DOM
Infinite scroll
Layout
Misc
Other
Scheduled events
Scrolling
Selection
State
Time axis
Tree
Widget hierarchy
Functions
170
Functions
170Other
Aggregates collected child records data to its parent. The method is synchronous and is called when all the child records data is ready. Override the method if you need to preprocess or postprocess parent records aggregated data:
class MyHistogramView extends TimelineHistogram({
aggregateHistogramData(recordsData, records, aggregationContext) {
const result = super.aggregateHistogramData(recordsData, records, aggregationContext);
// postprocess averageSalary series values collected for a parent record
result.forEach(entry => {
entry.averageSalary = entry.averageSalary / records.length;
});
return result;
}
});
| Parameter | Type | Description |
|---|---|---|
recordsData | Object[] | Child records histogram data. |
records | Model[] | Child records. |
aggregationContext | Object | An object containing current shared info on the current aggregation process |
Resets generated records (parents and links) data cache
Parent histogram data collecting
Aggregates multiple records histogram data.
If some of the provided records data is not ready yet the method returns a Promise
that's resolved once the data is ready and aggregated.
| Parameter | Type | Description |
|---|---|---|
records | Model[] | Records to aggregate data of. |
aggregationContext | Object | Optional aggregation context object. Can be used by to share some data between the aggregation steps. |
Either the provided group record histogram data or a Promise that
returns the data when resolved.
Aggregates the provided group record children histogram data.
If some of the provided records data is not ready yet the method returns a Promise
that's resolved once the data is ready and aggregated.
// get parent record aggregated histogram data
const aggregatedData = await histogram.getGroupRecordHistogramData(record);
| Parameter | Type | Description |
|---|---|---|
record | Model | Group record. |
aggregationContext | Object | Optional aggregation context object. When provided will be used as a shared object passed through while collecting the data. So can be used for some custom application purposes. |
Either the provided group record histogram data or a Promise that
returns the data when resolved.