datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/data-processing.service.ts
Properties |
Methods |
constructor(fileGenerators: FileGenerator[], utils: UtilsService)
|
|||||||||
Parameters :
|
createExportData | ||||||||||||||||||
createExportData(dataToExport: DataToExport, time: string, isMeasurement: boolean, value: number, valueMax?: number)
|
||||||||||||||||||
Parameters :
Returns :
ExportData
|
createFileName | ||||||||||||
createFileName(source: string | number, fragmentSeries: string, fileExtension: string)
|
||||||||||||
Parameters :
Returns :
string
|
Async exportSeriesData | ||||||||
exportSeriesData(params: SeriesExportParams)
|
||||||||
Exports the given data to CSV or Excel files.
Parameters :
Returns :
Promise<Blob>
A Promise that resolves to a Blob representing the exported file. |
Async exportSeriesDataToMergedFiles | ||||||||||||||||
exportSeriesDataToMergedFiles(exportData: ExportData[], fileType: string, mergedExportDetails: MergedExportDetails)
|
||||||||||||||||
Exports the given data to merged CSV or Excel files. Example of exported merged file structure: date from date to 2024-04-15T12:14:00.000Z 2024-07-16T14:14:28+02:00 time G6Fit -> c8y_Acceleration.accelerationX [G] G6Fit -> c8y_Acceleration.accelerationY [G] 2024-05-13T13:45:10.500+02:00 0.0109026359624273 0.789461628278069 Example of exported file name format: 04dec231240-06dec232350.xlsx
Parameters :
Returns :
Promise<ExportedFile>
An objects containing file name and its respective content as Blob. Example of exported merged file structure: date from date to 2024-04-15T12:14:00.000Z 2024-07-16T14:14:28+02:00 time G6Fit -> c8y_Acceleration.accelerationX [G] G6Fit -> c8y_Acceleration.accelerationY [G] 2024-05-13T13:45:10.500+02:00 0.0109026359624273 0.789461628278069 Example of exported file name format: 04dec231240-06dec232350.xlsx |
processDataToExport | ||||||||
processDataToExport(dataToExport: DataToExport)
|
||||||||
Processes a single dataToExport and transforms it into an array of ExportData. Used further for creating series data based export and also for measurements and series data based preview. Series data provides min and max values for each timestamp. Example :
Parameters :
Returns :
ExportData[]
An array of ExportData representing the processed datapoint, that can be used as a row data in the exported files or for preview. |
setGenerators | ||||||
setGenerators(fileGenerators: FileGenerator[])
|
||||||
Parameters :
Returns :
void
|
transformToExportFileStructureForPreview | ||||||||
transformToExportFileStructureForPreview(dataToExport: DataToExport[])
|
||||||||
Transforms the input datapoints with values into a structured format for a preview.
Parameters :
Returns :
ExportData[]
Provides an array of up to 5 ExportData elements (no more is needed for a preview) or an empty array, |
Async zipFiles | ||||||||
zipFiles(files: ExportedFile[])
|
||||||||
Zips all created files.
Parameters :
Returns :
Promise<Blob>
A Promise that resolves to a Blob representing the generated zip file. |
fileTypesConfigs |
Type : literal type
|
mergeMapping |
Type : object
|
Default value : {}
|