import type { GeoJsonDataType } from './types'; import { DataPoint } from './DataPoint'; import { DataSeries } from './DataSeries'; import { DataPrimitive, TypedValue, DataType, IDataFrame } from './DataPrimitive'; import { IDimension } from './Dimensions'; export type ColumnVal = number | string | string[]; export interface ColumnarData { data: { fields: { name: string; type?: string; }[] | string[]; columns: ColumnVal[][]; }; } /** * Base DataFrame class and associated DataFrame selectors * @implements {DataPrimitive} */ export declare class DataFrame implements IDataFrame, DataPrimitive { /** * List of series comprising the DataFrame * @public * @instance */ series: DataSeries[]; /** * @param {any} o * @returns {boolean} */ static isDataFrame(o: any): o is DataFrame; /** * @param {array} series list of data series */ constructor(series: DataSeries[]); /** * Loads ColumnarData into a DataFrame * @param {ColumnarData} columnarData * @returns {DataFrame} */ static fromJsonCols(columnarData: ColumnarData): DataFrame; static fromRaw(f: any[][]): DataFrame; static fromDataPrimitive(dp: IDimension): DataFrame; /** * Filter a DataFrame by specifying the indexes of the DataSeries you would like to return. * For example, `frameBySeriesIndexes(first_index, second_index, ...)`, where at least one index is required. * @public * @param {number[]} indexes * @returns {DataFrame.} * * The following code sample shows how to use frameBySeriesIndexes to render a table that includes the first, second, and fourth DataSeries from the data source. * * ``` * primary | frameBySeriesIndexes(0,1,3)' * }}, * dataSources={{ * primary: { * data: { * fields: [ * { * name: 'Name' * }, * { * name: 'UserID' * }, * { * name: 'Money Spent' * }, * { * name: 'Most Recent Game' * } * ], * columns: [ * [ * 'Ms. Herman Beer', * 'Crystal Ziemann', * 'Phil Bartoletti', * 'Janis Kiehn V', * 'Angel Krajcik', * 'Patti Hodkiewicz IV', * 'Joanne Emmerich', * 'Jay Renner', * 'Ora Borer', * 'Dr. Bradford Gulgowski' * ], * [ * 'Enrico98', * 'Taylor_Parker83', * 'Candice_Carroll', * 'Yolanda_McLaughlin95', * 'Modesto84', * 'Elwin52', * 'Francis8', * 'Charley.Feeney85', * 'Jensen_Jacobson74', * 'Dora_Volkman' * ], * [ * 9740890.83, * 2107983.52, * 5467223.67, * 9529184.93, * 9692275.78, * 5692737.43, * 1001734.82, * 3848531.8, * 3848531.8 * ], * [ * '2020-04-12T06:32:08-07:00', * '2020-06-06T16:14:04-07:00', * '2020-02-12T09:43:25-08:00', * '2020-07-25T13:19:49-07:00', * '2020-03-16T21:46:40-07:00', * '2020-08-21T08:38:55-07:00', * '2020-09-26T16:06:03-07:00', * '2020-08-10T14:54:16-07:00', * '2020-08-11T16:49:24-07:00', * '2020-09-29T03:52:51-07:00' * ] * ] * }, * meta: { * totalCount: 100 * }, * requestParams: { * count: 10, * offset: 0 * } * } * }} * /> */ frameBySeriesIndexes(...indexes: number[]): DataFrame; /** * Select a DataSeries by specifying the index of the series you want to return. * @public * @param {number} index * @returns {DataSeries} * * The following code sample shows how to use seriesByIndex to display the second series in a data source as a single value. * * ``` * primary | seriesByIndex(1)' * }} * dataSources={{ * primary: { * data: { * fields: [ * { * name: '_time', * }, * { * name: 'count', * }, * ], * columns: [ * [ * '2018-08-19T00:00:00.000+00:00', * '2018-08-20T00:00:00.000+00:00', * '2018-08-21T00:00:00.000+00:00', * '2018-08-22T00:00:00.000+00:00', * '2018-08-23T00:00:00.000+00:00', * '2018-08-24T00:00:00.000+00:00', * '2018-08-25T00:00:00.000+00:00', * '2018-08-26T00:00:00.000+00:00', * ], * ['1', '62', '103', '308', '587', '876', '930', '1320'], * ], * }, * meta: {}, * }, * }} * /> * */ seriesByIndex(index: number, defaultSeries?: any): DataSeries; /** * Filter a DataFrame by specifying the index range [start, end) of the DataSeries you would like to return. * For example, `frameBySeriesIndexRange(start_index)` or `frameBySeriesIndexRange(start_index, end_index)`, where at least the starting index is required. * @public * @param {int} start (inclusive) * @param {int=} end (optional, exclusive) * @returns {DataFrame} * * The following code sample shows how to use frameBySeriesIndexRange to render a table that includes the first, second, and third series from the data source. * * ``` *
primary | frameBySeriesIndexRange(0,2)' * }}, * dataSources={{ * primary: { * data: { * fields: [ * { * name: 'Name' * }, * { * name: 'UserID' * }, * { * name: 'Money Spent' * }, * { * name: 'Most Recent Game' * }, * ], * columns: [ * [ * 'Ms. Herman Beer', * 'Crystal Ziemann', * 'Phil Bartoletti', * 'Janis Kiehn V', * 'Angel Krajcik', * 'Patti Hodkiewicz IV', * 'Joanne Emmerich', * 'Jay Renner', * 'Ora Borer', * 'Dr. Bradford Gulgowski' * ], * [ * 'Enrico98', * 'Taylor_Parker83', * 'Candice_Carroll', * 'Yolanda_McLaughlin95', * 'Modesto84', * 'Elwin52', * 'Francis8', * 'Charley.Feeney85', * 'Jensen_Jacobson74', * 'Dora_Volkman' * ], * [ * 9740890.83, * 2107983.52, * 5467223.67, * 9529184.93, * 9692275.78, * 9395814.7, * 5692737.43, * 1001734.82, * 3848531.8, * 1691776.38 * ], * [ * '2020-04-12T06:32:08-07:00', * '2020-06-06T16:14:04-07:00', * '2020-02-12T09:43:25-08:00', * '2020-07-25T13:19:49-07:00', * '2020-03-16T21:46:40-07:00', * '2020-08-21T08:38:55-07:00', * '2020-09-26T16:06:03-07:00', * '2020-08-10T14:54:16-07:00', * '2020-08-11T16:49:24-07:00', * '2020-09-29T03:52:51-07:00' * ] * ] * }, * meta: { * totalCount: 100 * }, * requestParams: { * count: 10, * offset: 0 * } * } * }} * /> */ frameBySeriesIndexRange(start: number, end?: number): DataFrame; /** * Filter a DataFrame by specifying the names of the DataSeries you would like to return. * For example, `frameBySeriesNames(first_name, second_name, ...)`, where at least one series name is required. * @public * @param {string[]} names * @returns {DataFrame} * * The following code sample shows how to use frameBySeriesNames to render a table with the Name and Money Spent columns in the data source. * * ``` *
primary | frameBySeriesNames("Name", "Money Spent")' * }}, * dataSources={{ * primary: { * data: { * fields: [ * { * name: 'Name' * }, * { * name: 'UserID' * }, * { * name: 'Money Spent' * }, * { * name: 'Most Recent Game' * }, * ], * columns: [ * [ * 'Ms. Herman Beer', * 'Crystal Ziemann', * 'Phil Bartoletti', * 'Janis Kiehn V', * 'Angel Krajcik', * 'Patti Hodkiewicz IV', * 'Joanne Emmerich', * 'Jay Renner', * 'Ora Borer', * 'Dr. Bradford Gulgowski' * ], * [ * 'Enrico98', * 'Taylor_Parker83', * 'Candice_Carroll', * 'Yolanda_McLaughlin95', * 'Modesto84', * 'Elwin52', * 'Francis8', * 'Charley.Feeney85', * 'Jensen_Jacobson74', * 'Dora_Volkman' * ], * [ * 9740890.83, * 2107983.52, * 5467223.67, * 9529184.93, * 9692275.78, * 9395814.7, * 5692737.43, * 1001734.82, * 3848531.8, * 1691776.38 * ], * [ * '2020-04-12T06:32:08-07:00', * '2020-06-06T16:14:04-07:00', * '2020-02-12T09:43:25-08:00', * '2020-07-25T13:19:49-07:00', * '2020-03-16T21:46:40-07:00', * '2020-08-21T08:38:55-07:00', * '2020-09-26T16:06:03-07:00', * '2020-08-10T14:54:16-07:00', * '2020-08-11T16:49:24-07:00', * '2020-09-29T03:52:51-07:00' * ] * ] * }, * meta: { * totalCount: 100 * }, * requestParams { * count: 10, * offset: 0 * } * } * }} * /> */ frameBySeriesNames(...names: string[]): DataFrame; /** * Filter a DataFrame by specifying the names of the DataSeries you would like to omit. * e.g. `frameWithoutSeriesNames(first_name, second_name, ...)`, where at least one series name is required. * Note: the data columns of internal fields are automatically excluded from the result. * @public * @param {string[]} names * @returns {DataFrame} */ frameWithoutSeriesNames(...names: string[]): DataFrame; /** * Filter a DataFrame by removing all internal fields starting with underscore `_`. * For example, if you have a primary data source with the following fields: `_time, _span, date, count, cost, _raw`, * then DSL `> primary | frameWithoutInternalFields()` removes all the internal fields and returns the DataFrame with fields `date, count, cost`. * @public * @returns {DataFrame} * * The following code sample shows how to use `frameWithoutInternalFields()` to remove the internal fields from the data source. * * ``` *
primary | frameWithoutInternalFields()' * }}, * dataSources={{ * primary: { * data: { * fields: [ * { * name: 'Name' * }, * { * name: 'UserID' * }, * { * name: '_time' * }, * { * name: '_span' * }, * ], * columns: [ * [ * 'Ms. Herman Beer', * 'Crystal Ziemann', * 'Jay Renner', * 'Ora Borer', * 'Dr. Bradford Gulgowski' * ], * [ * 'Enrico98', * 'Taylor_Parker83', * 'Charley.Feeney85', * 'Jensen_Jacobson74', * 'Dora_Volkman' * ], * [ * '2020-04-12T06:32:08-07:00', * '2020-06-06T16:14:04-07:00', * '2020-08-10T14:54:16-07:00', * '2020-08-11T16:49:24-07:00', * '2020-09-29T03:52:51-07:00' * ], * [ * '1800', * '1800', * '1800', * '1800', * '1800' * ] * ] * }, * meta: { * totalCount: 100 * }, * requestParams { * count: 10, * offset: 0 * } * } * }} * /> * ``` * This code sample will visualize a table with the `Name` and `UserID` columns, * and the columns of `_time` and `_span` (internal fields) will not be displayed. * * Another example of using `frameWithoutInternalFields()` in a chained DSL: * * ``` * primary | frameWithoutInternalFields() | seriesByIndex(0) | lastPoint()" * }}, * dataSources={{ * primary: { * data: { * fields: [ * { * name: '_time' * }, * { * name: '_span' * }, * { * name: 'Name' * }, * { * name: 'UserID' * } * ], * columns: [ * [ * '2020-04-12T06:32:08-07:00', * '2020-06-06T16:14:04-07:00', * '2020-08-10T14:54:16-07:00', * '2020-08-11T16:49:24-07:00', * '2020-09-29T03:52:51-07:00' * ], * [ * '1800', * '1800', * '1800', * '1800', * '1800' * ], * [ * 'Patti Hodkiewicz IV', * 'Joanne Emmerich', * 'Jay Renner', * 'Ora Borer', * 'Dr. Bradford Gulgowski' * ], * [ * 'Elwin52', * 'Francis8', * 'Charley.Feeney85', * 'Jensen_Jacobson74', * 'Dora_Volkman' * ] * ] * }, * meta: { * totalCount: 100 * }, * requestParams { * count: 10, * offset: 0 * } * } * }} * /> * ``` * This code sample will visualize `Dr. Bradford Gulgowski` as the major value, * because both internal fields (`_time` and `_span`) are removed and index `0` of the rest of the data frame corresponds to the `Name` column. */ frameWithoutInternalFields(): DataFrame; /** * Filter a DataFrame by removing all internal fields starting with underscore `_`, except for the fields listed in `names`. * For example, if you have a primary data source with the following fields: `_time, _span, date, count, cost, _raw`, * then DSL `> primary | frameWithoutInternalFields('_time')` removes all the internal fields except `_time` and returns the DataFrame with fields `_time, date, count, cost`. * If you want to remove all the internal fields, use `frameWithoutInternalFields()` instead. * If you pass any non-internal fields as parameters, they will be ignored. * * @public * @param {string[]} names * @returns {DataFrame} * * The following code sample shows how to use `frameWithoutInternalFieldsExcept(...names)` to remove some internal fields from the data source, but leaving specified internal fields by their field names. * * ``` *
primary | frameWithoutInternalFieldsExcept('_time', '_span')' * }}, * dataSources={{ * primary: { * data: { * fields: [ * { * name: 'Name' * }, * { * name: 'UserID' * }, * { * name: '_time' * }, * { * name: '_span' * }, * { * name: '_raw' * }, * ], * columns: [ * [ * 'Ms. Herman Beer', * 'Joanne Emmerich', * 'Jay Renner', * 'Ora Borer', * 'Dr. Bradford Gulgowski' * ], * [ * 'Enrico98', * 'Francis8', * 'Charley.Feeney85', * 'Jensen_Jacobson74', * 'Dora_Volkman' * ], * [ * '2020-04-12T06:32:08-07:00', * '2020-09-26T16:06:03-07:00', * '2020-08-10T14:54:16-07:00', * '2020-08-11T16:49:24-07:00', * '2020-09-29T03:52:51-07:00' * ], * [ * '1800', * '1800', * '1800', * '1800', * '1800' * ], * [ * '2020-04-12T06:32:08-07:00', * '2020-09-26T16:06:03-07:00', * '2020-08-10T14:54:16-07:00', * '2020-08-11T16:49:24-07:00', * '2020-09-29T03:52:51-07:00' * ] * ] * }, * meta: { * totalCount: 100 * }, * requestParams { * count: 10, * offset: 0 * } * } * }} * /> * ``` * * This code sample will visualize the table with the `Name`, `UserID`, `_time` and `_span` columns, * and the `_raw` columns will not be displayed. * * Another example of using `frameWithoutInternalFieldsExcept(...names)` in a chained DSL: * * ``` * primary | frameWithoutInternalFieldsExcept('_time') | seriesByIndex(1) | lastPoint()" * }}, * dataSources={{ * primary: { * data: { * fields: [ * { * name: '_time' * }, * { * name: '_span' * }, * { * name: '_raw' * }, * { * name: 'Name' * }, * { * name: 'UserID' * } * ], * columns: [ * [ * '2020-04-12T06:32:08-07:00', * '2020-09-26T16:06:03-07:00', * '2020-08-10T14:54:16-07:00', * '2020-08-11T16:49:24-07:00', * '2020-09-29T03:52:51-07:00' * ], * [ * '1800', * '1800', * '1800', * '1800', * '1800' * ], * [ * '2020-04-12T06:32:08-07:00', * '2020-06-06T16:14:04-07:00', * '2020-08-10T14:54:16-07:00', * '2020-08-11T16:49:24-07:00', * '2020-09-29T03:52:51-07:00' * ], * [ * 'Ms. Herman Beer', * 'Crystal Ziemann', * 'Angel Krajcik', * 'Jay Renner', * 'Dr. Bradford Gulgowski' * ], * [ * 'Candice_Carroll', * 'Elwin52', * 'Francis8', * 'Charley.Feeney85', * 'Dora_Volkman' * ] * ] * }, * meta: { * totalCount: 100 * }, * requestParams { * count: 10, * offset: 0 * } * } * }} * /> * ``` * * This code sample will visualize `Dr. Bradford Gulgowski` as the major value, because the internal fields other than `_time` are excluded, * and index `1` of the rest of the data frame (`_time`, `Name`, `UserID`) corresponds to the `Name` column. */ frameWithoutInternalFieldsExcept(...names: string[]): DataFrame; /** * Filter a DataFrame by specifying one or more names or indexes of DataSeries you would like to return. * For example,`frameBySeriesNames(first_name_or_index, second_name_or_index, ...)`, where at least one name or index is required. * @public * @param {...(string|number)} namesOrIndexes * @returns {DataFrame} * * The following code sample shows how to use frameBySeriesNamesOrIndexes to render a table with the Name DataSeries and the fourth DataSeries in the data source. * * ``` *
primary | frameBySeriesNamesOrIndexes("Name", 3)' * }}, * dataSources={{ * primary: { * data: { * fields: [ * { * name: 'Name' * }, * { * name: 'UserID' * }, * { * name: 'Money Spent' * }, * { * name: 'Most Recent Game' * }, * ], * columns: [ * [ * 'Ms. Herman Beer', * 'Crystal Ziemann', * 'Phil Bartoletti', * 'Janis Kiehn V', * 'Angel Krajcik', * 'Patti Hodkiewicz IV', * 'Joanne Emmerich', * 'Jay Renner', * 'Ora Borer', * 'Dr. Bradford Gulgowski' * ], * [ * 'Enrico98', * 'Taylor_Parker83', * 'Candice_Carroll', * 'Yolanda_McLaughlin95', * 'Modesto84', * 'Elwin52', * 'Francis8', * 'Charley.Feeney85', * 'Jensen_Jacobson74', * 'Dora_Volkman' * ], * [ * 9740890.83, * 2107983.52, * 5467223.67, * 9529184.93, * 9692275.78, * 9395814.7, * 5692737.43, * 1001734.82, * 3848531.8, * 1691776.38 * ], * [ * '2020-04-12T06:32:08-07:00', * '2020-06-06T16:14:04-07:00', * '2020-02-12T09:43:25-08:00', * '2020-07-25T13:19:49-07:00', * '2020-03-16T21:46:40-07:00', * '2020-08-21T08:38:55-07:00', * '2020-09-26T16:06:03-07:00', * '2020-08-10T14:54:16-07:00', * '2020-08-11T16:49:24-07:00', * '2020-09-29T03:52:51-07:00', * ] * ] * }, * meta: { * totalCount: 100 * }, * requestParams: { * count: 10, * offset: 0 * } * } * }} * /> */ frameBySeriesNamesOrIndexes(...mixed: (string | number)[]): DataFrame; /** * Filter a DataFrame by specifying one or more types of DataSeries you would like to return. * For example, `frameBySeriesNames(first_type, second_type, ...)`, where at least one type is required. * @public * @param {DataType[]} types * @returns {DataFrame} * * The following code sample shows how to use frameBySeriesTypes to render a table that contains only the string columns in the data source. * * ``` *
primary | frameBySeriesTypes("string")' * }}, * dataSources={{ * primary: { * data: { * fields: [ * { * name: 'Name' * }, * { * name: 'UserID' * }, * { * name: 'Money Spent' * }, * { * name: 'Most Recent Game' * }, * ], * columns: [ * [ * 'Ms. Herman Beer', * 'Crystal Ziemann', * 'Phil Bartoletti', * 'Janis Kiehn V', * 'Angel Krajcik', * 'Patti Hodkiewicz IV', * 'Joanne Emmerich', * 'Jay Renner', * 'Ora Borer', * 'Dr. Bradford Gulgowski' * ], * [ * 'Enrico98', * 'Taylor_Parker83', * 'Candice_Carroll', * 'Yolanda_McLaughlin95', * 'Modesto84', * 'Elwin52', * 'Francis8', * 'Charley.Feeney85', * 'Jensen_Jacobson74', * 'Dora_Volkman' * ], * [ * 9740890.83, * 2107983.52, * 5467223.67, * 9529184.93, * 9692275.78, * 9395814.7, * 5692737.43, * 1001734.82, * 3848531.8, * 1691776.38 * ], * [ * '2020-04-12T06:32:08-07:00', * '2020-06-06T16:14:04-07:00', * '2020-02-12T09:43:25-08:00', * '2020-07-25T13:19:49-07:00', * '2020-03-16T21:46:40-07:00', * '2020-08-21T08:38:55-07:00', * '2020-09-26T16:06:03-07:00', * '2020-08-10T14:54:16-07:00', * '2020-08-11T16:49:24-07:00', * '2020-09-29T03:52:51-07:00' * ] * ] * }, * meta: { * totalCount: 100 * }, * requestParams: { * count: 10, * offset: 0 * } * } * }} * /> */ frameBySeriesTypes(...types: T[]): DataFrame; /** * Select a DataSeries by specifying the name of the DataSeries you would like to return. * @public * @param {string} field * @returns {DataSeries} * * The following code sample shows how to use seriesByName to display the count series in a data source as a single value. * * ``` * primary | seriesByName("count")', * }} * dataSources={{ * primary: { * data: { * fields: [ * { * name: '_time', * }, * { * name: 'count', * }, * ], * columns: [ * [ * '2018-08-19T00:00:00.000+00:00', * '2018-08-20T00:00:00.000+00:00', * '2018-08-21T00:00:00.000+00:00', * '2018-08-22T00:00:00.000+00:00', * '2018-08-23T00:00:00.000+00:00', * '2018-08-24T00:00:00.000+00:00', * '2018-08-25T00:00:00.000+00:00', * '2018-08-26T00:00:00.000+00:00', * ], * ['1', '62', '103', '308', '587', '876', '930', '1320'], * ], * }, * meta: {}, * }, * }} * /> */ seriesByName(field: string, defaultSeries?: any): DataSeries; /** * Select a DataSeries by specifying the type of the DataSeries you would like to return. The first DataSeries that matches the first type specified will be returned. If no DataSeries matches the first type specified, no DataSeries will be returned. * @public * @param {DataType} type * @returns {DataSeries} * * The following code sample shows how to use seriesByType to display the first numeric series in a data source as a single value. * * If no numeric series are found, return nothing and display N/A. * * ``` * primary | seriesByType("number")', * }} * dataSources: {{ * primary: { * data: { * fields: [ * { * name: '_time", * }, * { * name: 'count', * }, * ], * columns: [ * [ * '2018-08-19T00:00:00.000+00:00', * '2018-08-20T00:00:00.000+00:00', * '2018-08-21T00:00:00.000+00:00', * '2018-08-22T00:00:00.000+00:00', * '2018-08-23T00:00:00.000+00:00', * '2018-08-24T00:00:00.000+00:00', * '2018-08-25T00:00:00.000+00:00', * '2018-08-26T00:00:00.000+00:00', * ], * [ '1', '62', '103', '308', '587', '876', '930', '1320'], * ], * }, * meta: {}, * }, * }} * /> */ seriesByType(type: DataType): DataSeries; /** * Select a DataSeries by specifying any acceptable types of the DataSeries you would like to return. The first DataSeries that matches any of the types specified will be returned. If no DataSeries matches the type options specified, no DataSeries will be returned. * @public * @param {DataType[]} types * @returns {DataSeries} */ seriesByTypes(...types: DataType[]): DataSeries; /** * Select a DataSeries by specifying the prioritized types of the DataSeries you would like to return. The first DataSeries that matches the first type specified will be returned. If no DataSeries matches the first type specified, the first DataSeries that matches the second type will be returned, and so on. * @public * @param {DataType[]} types * @returns {DataSeries} * * The following code sample shows how to use seriesByPrioritizedTypes to display the first numeric series in a data source as a single value. * * If no numeric series are found in the data, the first series of type string is displayed. If no string series are found, the first series of type time is displayed. * * ``` * primary | seriesByPrioritizedTypes'("number", "string", "time"), * }} * dataSources={{ * primary: { * data: { * columns: [ * [ * '2018-08-19T00:00:00.000+00:00', * '2018-08-20T00:00:00.000+00:00', * '2018-08-21T00:00:00.000+00:00', * '2018-08-22T00:00:00.000+00:00', * '2018-08-23T00:00:00.000+00:00', * '2018-08-24T00:00:00.000+00:00', * '2018-08-25T00:00:00.000+00:00', * '2018-08-26T00:00:00.000+00:00', * ], * [ 'INFO', 'ERROR', 'WARN', 'INFO', 'ERROR', 'WARN', 'INFO', 'WARN'], * ], * fields: [ * { * name: '_time', * }, * { * name: 'status', * }, * ], * }, * meta: {}, * }, * }} * /> */ seriesByPrioritizedTypes(...types: DataType[]): DataSeries; /** * Set all values in the DataFrame to a static TypedValue. * @public * @param {TypedValue} v */ setValue(v: TypedValue): void; /** * Get all values in the DataFrame. This excludes field names. * @public * @returns {array} */ getRawValue(): (string | number | GeoJsonDataType)[][]; /** * Get all values and their types in the DataFrame. This excludes field names. * @public * @returns {TypedValue[][]} */ getValue(): TypedValue[][]; /** * Get the names of each DataSeries in the DataFrame. * @public * @returns {DataSeries} * * ``` *
table | getField()' * }}, * dataSources={{ * primary: { * data: { * fields: [ * { * name: 'Name' * }, * { * name: 'UserID' * }, * { * name: 'Money Spent' * }, * { * name: 'Most Recent Game' * }, * ], * columns: [ * [ * 'Ms. Herman Beer', * 'Crystal Ziemann', * 'Phil Bartoletti', * 'Janis Kiehn V', * 'Angel Krajcik', * 'Patti Hodkiewicz IV', * 'Joanne Emmerich', * 'Jay Renner', * 'Ora Borer', * 'Dr. Bradford Gulgowski' * ], * [ * 'Enrico98', * 'Taylor_Parker83', * 'Candice_Carroll', * 'Yolanda_McLaughlin95', * 'Modesto84', * 'Elwin52', * 'Francis8', * 'Charley.Feeney85', * 'Jensen_Jacobson74', * 'Dore_Volkman' * ], * [ * 9740890.83, * 2107983.52, * 5467223.67, * 9529184.93, * 9692275.78, * 9395814.7, * 5692737.43, * 1001734.82, * 3848531.8, * 1691776.38 * ], * [ * '2020-04-12T06:32:08-07:00', * '2020-06-06T16:14:04-07:00', * '2020-02-12T09:43:25-08:00', * '2020-07-25T13:19:49-07:00', * '2020-03-16T21:46:40-07:00', * '2020-08-21T08:38:55-07:00', * '2020-09-26T16:06:03-07:00', * '2020-08-10T14:54:16-07:00', * '2020-08-11T16:49:24-07:00', * '2020-09-29T03:52:51-07:00' * ] * ] * }, * meta: { * totalCount: 100 * }, * requestParams: { * count: 10, * offset: 0 * } * } * }} * /> * * Display the third and fourth DataSeries in a column chart as overlay fields. * * primary | frameBySeriesIndex(2,3) | getField()' * }}, * dataSources={{ * primary: { * requestParams: { offset: 0, count: 20}, * data: { * fields: [ * { name: '_time' }, * { name: 'splunkd' }, * { name: 'splunkd_web_access' }, * { name: 'mongod' }, * ], * columns: [ * [ * '2018-05-02T18:15:46.000-07:00', * '2018-05-02T18:15:47.000-07:00', * '2018-05-02T18:15:48.000-07:00', * '2018-05-02T18:15:49.000-07:00', * '2018-05-02T18:15:50.000-07:00', * ], * ['67228', '83195', '3145', '19332', '29763'], * ['67228', '83195', '3145', '19332', '29763'], * ['14881', '17341', '18081', '19774', '10467'], * ] * }, * meta: { * totalCount: 100, * } * } * }} * /> */ getField(): DataSeries<'string'>; /** * Get the data type of each DataSeries in the DataFrame. * @public * @returns {string[]} */ getType(): string[]; /** * Get the global minimum value from all numeric DataSeries in the DataFrame. * @public * @returns {number} * * The following code sample shows how to use min to display the smallest data point in a data source as a single value. * * ``` * primary | min()', * trendDisplay: 'off', * sparklineDisplay: 'off' * }} * dataSources={{ * primary: { * data: { * fields: [ * { * name: '_time', * }, * { * name: 'count', * }, * ], * columns: [ * [ * '2018-08-19T00:00:00.000+00:00', * '2018-08-20T00:00:00.000+00:00', * '2018-08-21T00:00:00.000+00:00', * '2018-08-22T00:00:00.000+00:00', * '2018-08-23T00:00:00.000+00:00', * '2018-08-24T00:00:00.000+00:00', * '2018-08-25T00:00:00.000+00:00', * '2018-08-26T00:00:00.000+00:00', * ], * ['1', '62', '103', '308', '587', '876', '930', '1320'], * ], * }, * meta: {}, * }, * }} * /> */ min(): DataPoint; /** * Get the global maximum value from all numeric DataSeries in the DataFrame. * @public * @returns {number} * * The following code sample shows how to use max to display the largest data point in a data source as a single value. * * ``` * primary | max()', * trendDisplay: 'off', * sparklineDisplay: 'off', * }} * dataSources={{ * primary: { * data: { * fields: [ * { * name: '_time', * }, * { * name: 'count', * }, * ], * columns: [ * [ * '2018-08-19T00:00:00.000+00:00', * '2018-08-20T00:00:00.000+00:00', * '2018-08-21T00:00:00.000+00:00', * '2018-08-22T00:00:00.000+00:00', * '2018-08-23T00:00:00.000+00:00', * '2018-08-24T00:00:00.000+00:00', * '2018-08-25T00:00:00.000+00:00', * '2018-08-26T00:00:00.000+00:00', * ], * [ '1', '62', '103', '308', '587', '876', '930', '1320' ], * ], * }, * meta: {}, * }, * }} * /> */ max(): DataPoint; /** * runs result of min or max function over all the series and returns the data point * points * @param {string} aggName * @returns {DataPoint} */ private minOrMax; }