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
Parameter | Type | Description |
---|---|---|
pTable | PartitionedTable | The source table. |
t | Table | The source table. |
byColumns | String... | The selected columns. |
requireAllFiltersToDisplay | bool | Whether to display data when some, but not all, Input Filters are applied. |
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()