Skip to main content
Version: Java (Groovy)

oneClick

The oneClick method creates a SelectableDataSetOneClick with the specified columns from a source table. This is useful for methods like dynamic plotting, where Deephaven requires a SelectableDataSetOneClick instead of a standard table to execute certain operations.

Syntax

oneClick(pTable)
oneClick(pTable, requireAllFiltersToDisplay)
oneClick(t, requireAllFiltersToDisplay, byColumns)
oneClick(t, byColumns...)

Parameters

ParameterTypeDescription
pTablePartitionedTable

The source table.

tTable

The source table.

byColumnsString...

The selected columns.

requireAllFiltersToDisplaybool

Whether to display data when some, but not all, Input Filters are applied. False will display data when not all filters are selected; True will only display data when appropriate filters are selected.

Returns

A SelectableDataSetOneClick.

Examples

In this example, we create a source table, then use oneClick to create a SelectableDataSetOneClick copy of the table. Then, we use plot to turn our SelectableDataSetOneClick into a plot, which can then be filtered via Controls > Input Filter in the user interface.

import static io.deephaven.csv.CsvTools.readCsv

source = readCsv("https://media.githubusercontent.com/media/deephaven/examples/main/CryptoCurrencyHistory/CSV/CryptoTrades_20210922.csv")
oc = oneClick(source, "Instrument")
plot = plot("Plot", oc, "Timestamp", "Price").show()

In this example, we create two plots, demonstrating the requireAllFiltersToDisplay parameter's function.

import static io.deephaven.csv.CsvTools.readCsv

source = readCsv("https://media.githubusercontent.com/media/deephaven/examples/main/CryptoCurrencyHistory/CSV/CryptoTrades_20210922.csv")
oc = oneClick(source, true, "Instrument")
oc2 = oneClick(source, false, "Instrument")
plot = plot("Plot", oc, "Timestamp", "Price").show()
plot2 = plot("Plot", oc2, "Timestamp", "Price").show()

img