ReadonlyautoWhether the ID was automatic generated or given in the constructor.
ReadonlycolumnsCollection of columns in the table.
ReadonlyidID of the table for identification purposes.
ReadonlyisOptionalmetadataOptionalmodifiedNumber of rows in the table.
ProtectedversionFunction
Changes the ID of an existing column to a new ID, effectively renaming the column.
Highcharts.DataTable#changeColumnId
Id of the column to be changed.
New id of the column.
Returns true if successful, false if the column was not found.
Function
Returns a clone of this table. The cloned table is completely independent of the original, and any changes made to the clone will not affect the original table.
Highcharts.DataTable#clone
OptionalskipColumns: boolean
Whether to clone columns or not.
OptionaleventDetail: DataEventDetail
Custom information for pending events.
Clone of this data table.
Function
Deletes columns from the table.
Highcharts.DataTable#deleteColumns
OptionalcolumnIds: string[]
Names of columns to delete. If no array is provided, all columns will be deleted.
OptionaleventDetail: DataEventDetail
Custom information for pending events.
Returns the deleted columns, if found.
Deletes the row index references. This is useful when the original table is deleted, and the references are no longer needed. This table is then considered an original table or a table that has the same rows order as the original table.
Function
Deletes rows in this table.
Highcharts.DataTable#deleteRows
OptionalrowIndex: number | number[]
Index of the row where deletion should start, or an array of indices for deleting multiple rows. If not specified, all rows will be deleted.
OptionalrowCount: number = 1
Number of rows to delete.
OptionaleventDetail: DataEventDetail
Custom information for pending events.
Returns the deleted rows, if found.
Function
Fetches a single cell value.
Highcharts.DataTable#getCell
Column name of the cell to retrieve.
Row index of the cell to retrieve.
Returns the cell value or undefined.
Function
Fetches the given column by the canonical column name. This function is a simplified wrap of getColumns.
Highcharts.DataTable#getColumn
Name of the column to get.
OptionalasReference: boolean
Whether to return the column as a readonly reference.
A copy of the column, or undefined if not found.
Function
Fetches all column IDs.
Highcharts.DataTable#getColumnIds
Returns all column IDs.
FunctiongetFunction
Retrieves all or the given columns. Simplified version of the full
DataTable.getColumns method, always returning by reference.
Highcharts.DataTable#getColumns
OptionalcolumnIds: string[]
Column ids to retrieve.
OptionalasReference: booleanCollection of columns. If a requested column was not found, it is
undefined.
Takes the original row index and returns the local row index in the modified table for which this function is called.
Original row index to get the local row index for.
Returns the local row index or undefined if not found.
Returns the modified (clone) or the original data table if the modified one does not exist.
The modified (clone) or the original data table.
Takes the local row index and returns the index of the corresponding row in the original table.
Local row index to get the original row index for.
Returns the original row index or undefined if not found.
Function
Retrieves the row at a given index. This function is a simplified wrap of getRows.
Highcharts.DataTable#getRow
Row index to retrieve. First row has index 0.
OptionalcolumnIds: string[]
Column names in order to retrieve.
Returns the row values, or undefined if not found.
Function
Returns the number of rows in this table.
Highcharts.DataTable#getRowCount
Number of rows in this table.
Function
Retrieves the index of the first row matching a specific cell value.
Highcharts.DataTable#getRowIndexBy
Column to search in.
Cell value to search for. NaN and undefined are not supported.
OptionalrowIndexOffset: number
Index offset to start searching.
Index of the first row matching the cell value.
Function
Retrieves the row at a given index. This function is a simplified wrap of getRowObjects.
Highcharts.DataTable#getRowObject
Row index.
OptionalcolumnIds: string[]
Column names and their order to retrieve.
Returns the row values, or undefined if not found.
Function
Fetches all or a number of rows as an object.
Highcharts.DataTable#getRowObjects
OptionalrowIndex: number = 0
Index of the first row to fetch. Defaults to first row at index 0.
OptionalrowCount: number = ...
Number of rows to fetch. Defaults to maximal number of rows.
OptionalcolumnIds: string[]
Column names and their order to retrieve.
Returns retrieved rows.
Function
Fetches all or a number of rows as an array.
Highcharts.DataTable#getRows
OptionalrowIndex: number = 0
Index of the first row to fetch. Defaults to first row at index 0.
OptionalrowCount: number = ...
Number of rows to fetch. Defaults to maximal number of rows.
OptionalcolumnIds: string[]
Column names and their order to retrieve.
Returns retrieved rows.
Function
Returns the unique version tag of the current state of the table.
Highcharts.DataTable#getVersionTag
Unique version tag.
Function
Determines whether all specified column names exist in the table.
Highcharts.DataTable#hasColumns
Column names to check.
Returns true if all columns have been found, otherwise false.
Function
Checks if any row in the specified column contains the given cell value.
Highcharts.DataTable#hasRowWith
Column to search in.
Cell value to search for. NaN and undefined are not supported.
True, if a row has been found, otherwise false.
Function
Registers a callback function to be executed when a specific event is emitted. To stop listening to the event, call the function returned by this method.
Highcharts.DataTable#on
Event type as a string.
Function to register for an event callback.
Function to unregister callback from the event.
Function
Sets the value of a specific cell identified by column ID and row index. If the column does not exist, it will be created. If the row index is beyond the current row count, the table will be expanded to accommodate the new cell.
Highcharts.DataTable#setCell
Column name to set.
Row index to set.
Cell value to set.
OptionaleventDetail: DataEventDetail
Custom information for pending events.
Function
Sets cell values for a column. Will insert a new column, if not found.
Highcharts.DataTable#setColumn
Column name to set.
Optionalcolumn: Column = []
Values to set in the column.
OptionalrowIndex: number = 0
Index of the first row to change. (Default: 0)
OptionaleventDetail: DataEventDetail
Custom information for pending events.
Function
Replaces or updates multiple columns in the table with new data. If a column does not exist, it will be created and added to the table.
Highcharts.DataTable#setColumns
Columns as a collection, where the keys are the column names.
OptionalrowIndex: number
Index of the first row to change. Keep undefined to reset.
OptionaleventDetail: DataEventDetail
Custom information for pending events.
OptionaltypeAsOriginal: boolean
Determines whether the original column retains its type when data
replaced. If true, the original column keeps its type. If not
(default), the original column will adopt the type of the replacement
column.
Assigns a new data modifier to the table.
This method does not modify the table directly. Instead, it sets the
.modified property of the table with a modified copy of this table,
as produced by the modifier.
Optionalmodifier: DataModifier
Modifier to set, or undefined to unset.
OptionaleventDetail: DataEventDetail
Custom information for pending events.
Resolves to this table if successful, or rejects on failure.
Sets the original row indexes for the table. It is used to keep the reference to the original rows when modifying the table.
Original row indexes array.
Whether to omit the local row indexes calculation. Defaults to false.
Function
Sets cell values of a row. Will insert a new row, if no index was provided, or if the index is higher than the total number of table rows.
Note: This function is just a simplified wrap of Highcharts.DataTable#setRows.
Highcharts.DataTable#setRow
Function
Sets cell values for multiple rows. Will insert new rows, if no index was was provided, or if the index is higher than the total number of table rows.
Highcharts.DataTable#setRows
Row values to set.
OptionalrowIndex: number = ...
Index of the first row to set. Leave undefined to add as new rows.
Optionalinsert: boolean
Whether to insert the row at the given index, or to overwrite the row.
OptionaleventDetail: DataEventDetail
Custom information for pending events.
Class to manage columns and rows in a table structure. It provides methods to add, remove, and manipulate columns and rows, as well as to retrieve data from specific cells.
Name
Highcharts.DataTable
Param: options
Options to initialize the new DataTable instance.