use of io.deephaven.web.client.api.Column in project deephaven-core by deephaven.
the class ChartData method insertDataRange.
private void insertDataRange(UpdateEventData tableData, Range range, int offset) {
// splice in the new indexes
batchSplice(offset, asArray(indexes), longs(range));
// splice in data to each column
for (Entry<String, Map<JsFunction<Any, Any>, JsArray<Any>>> columnMap : cachedData.entrySet()) {
String columnName = columnMap.getKey();
Column col = table.findColumn(columnName);
for (Entry<JsFunction<Any, Any>, JsArray<Any>> mapFuncAndArray : columnMap.getValue().entrySet()) {
JsFunction<Any, Any> func = mapFuncAndArray.getKey();
JsArray<Any> arr = mapFuncAndArray.getValue();
// here we create a new array and splice it in, to avoid slowly growing the data array in the case
// of many rows being added
Any[] values = values(tableData, func, col, range);
batchSplice(offset, arr, values);
}
}
}
Aggregations