Last updated

API / geotoolkit / data / DataSeriesUtil / DataSeriesUtil

Class: DataSeriesUtil

data.DataSeriesUtil.DataSeriesUtil

Provides a set of methods to operate with DataSeries

Table of contents

Constructors
Methods

Contents

Constructors

new DataSeriesUtil()

new DataSeriesUtil()

Methods

mergeValues

Static mergeValues(src, dst): void

Merge data series from source to destination This function works ONLY if the existing data is ASC ordered.

Example

Depth       Value
50           0
100          1
200          2
300          3

mergeValues: [0,100,150,500], [-1,-100,-150,-500]

----     Depth       Value
===>       0           -1
----      50            0
===>      100         -100
===>      150         -150
----      200           2
----      300           3
===>      500         -500

Throws

if src.index or dst.index is not NumericalDataSeries

Parameters

Name Type Description
srcSourceobject to represent source data
dstDestinationobject to represent destination data

Returns

void


trimValues

Static trimValues(indexSeries, startIndexValue, endIndexValue, arrayOfSeries, datatable?): void

Remove values from start to end value of the index series and corresponded indices of the other series. All series must have the same size.

Throws

if indexSeries is not NumericalDataSeries

Parameters

Name Type Description
indexSeriesNumericalDataSeriesseries to represent index data
startIndexValuenumberstart value of the index series where to start trim
endIndexValuenumberend value of the index series where to end trim
arrayOfSeriesDataSeries<any>[]array of data series
Optional datatableDataTableoptional data table as a host of destination series

Returns

void