Skip to main content
Reference vendor/splunk 4 min read

udf-options

UDF Options Reference

Authoritative option keys for Studio viz types, data sources, and inputs. Sourced from @splunk/visualizations/*.config.js and @splunk/dashboard-inputs schemas.

When to load

Load for any conversion — these are the exact option keys the model must use when writing Studio JSON. Prevents hallucinated option names.

Supported conversions

  • Classic charting.* options → viz-specific option keys listed below
  • Classic <input> options (token, defaultValue, fieldForLabel, fieldForValue) → input option keys
  • Classic <query> + <earliest>/<latest> → ds.search queryParameters
  • Classic <search base="..."> chains → ds.chain

Unsupported — warn or ask

  • charting.* options not listed in this file have no Studio equivalent — note in report and skip
  • input.multiselect has no native delimiter/prefix/suffix — handled in references/form-inputs.md

Conversion rules

Data sources

ds.search

OptionTypeNotes
querystringSPL string, preserve verbatim
queryParameters.earlieststringe.g. -24h@h, $tok.earliest$
queryParameters.lateststringe.g. now, $tok.latest$
queryParameters.searchModefast | smart | verbose
queryParameters.sampleRationumber | string
refreshnumber | stringInterval in seconds or time expression
refreshTypedelay | intervaldelay = after search completes; interval = when dispatched

ds.chain

OptionTypeNotes
querystringSPL appended to the base search
extendstringKey of the base ds.search to chain from

Viz options — common (most chart types)

OptionTypeValues
backgroundColorstringHex color or token
legendDisplaystringright | left | top | bottom | off
legendLabelsarrayOverride legend label strings
legendModestringstandard | seriesCompare
seriesColorsarrayOrdered hex colors per series
seriesColorsByFieldobject{ "fieldName": "#hex" }
resultLimitnumberMax series to render
dataValuesDisplaystringoff | all | minmax
xAxisTitleTextstringX-axis label
yAxisTitleTextstringPrimary Y-axis label
y2AxisTitleTextstringSecondary Y-axis label
xAxisTitleVisibilitystringshow | hide
yAxisTitleVisibilitystringshow | hide
xAxisLabelVisibilitystringshow | hide
yAxisLabelVisibilitystringshow | hide
xAxisLabelRotationnumberDegrees
yAxisMinnumber
yAxisMaxnumber
yAxisScalestringlinear | log
showYAxisWithZerobooleanForce Y-axis to include zero
showXMajorGridLinesboolean
showYMajorGridLinesboolean
showSplitSeriesbooleanSeparate each series into its own panel
splitByLayoutstringtrellis to enable trellis

Viz options — splunk.line / splunk.area

OptionTypeValues
nullValueDisplaystringzero | connect | gaps
lineDashStylestringsolid | shortDash | longDash
lineWidthnumberStroke width in px
showLineSmoothingboolean
markerDisplaystringoff | auto (line only)
stackModestringauto | stacked | stacked100 (area only)
overlayFieldsarrayFields to render on Y2 axis

Viz options — splunk.bar / splunk.column

OptionTypeValues
stackModestringauto | stacked | stacked100
overlayFieldsarrayFields to render on Y2 axis

Viz options — splunk.pie

OptionTypeValues
labelDisplaystringvaluesAndPercentage | percentage | value | label
labelFieldstringField for slice labels
valueFieldstringField for slice values
showDonutHolebooleanRender as donut
collapseThresholdnumberCollapse slices below this %
collapseLabelstringLabel for collapsed “other” slice

Viz options — splunk.table

OptionTypeValues
countnumberRows per page
showRowNumbersboolean
headerVisibilitystringshow | hide
showFooterTotalsboolean
showFooterPercentagesboolean
columnFormatobjectPer-column formatting config

Viz options — splunk.singlevalue

OptionTypeValues
majorValuestringDSL expression (default > majorValue)
majorValueFieldstringField to use as the major value
majorColorstringHex color
majorFontSizenumberpx
underLabelstringCaption below the major value
underLabelColorstringHex color
unitstringe.g. "events", "ms"
unitPositionstringbefore | after
trendValuestringDSL expression for trend
trendDisplaystringabsolute | percent | off
trendColorstringHex color
sparklineDisplaystringbefore | after | below | off
sparklineValuesstringDSL expression for sparkline data
numberPrecisionnumberDecimal places
shouldUseThousandSeparatorsboolean

Viz options — splunk.events

OptionTypeValues
pageCountnumberEvents per page
showFieldSummaryboolean

Viz options — splunk.markdown

No datasource required. Content goes in options.markdown:

{
  "type": "splunk.markdown",
  "options": {
    "markdown": "## Heading\n\nText with **bold** and token: $myToken$"
  }
}

Input options — common

OptionTypeNotes
tokenstringRequired — token name the input sets
tokenNamespacestringDefault "default"
defaultValuestringValue when no selection made

Input options — input.dropdown

OptionTypeNotes
itemsarray | stringStatic [{label, value}] or DSL string (see dynamic pattern below)
selectFirstSearchResultbooleanMutually exclusive with defaultValue
isCascadingInputbooleanResets to default when upstream token changes

Input options — input.multiselect

Same as dropdown plus:

OptionTypeNotes
defaultValuestring | arraySingle string or array of strings
clearDefaultOnSelectionbooleanDefault true

Input options — input.text

token, tokenNamespace, defaultValue only.

Input options — input.number

OptionTypeNotes
minnumber
maxnumber
stepnumberDefault 1

Input options — input.timerange

token and defaultValue as "earliest,latest" string (e.g. "-24h@h,now").

Sets two tokens: $<token>.earliest$ and $<token>.latest$.

Input options — input.button

Uses eventHandlers rather than token. See references/drilldown.md.


Dynamic input items DSL

When a classic <input> has <fieldForLabel> / <fieldForValue> with a <search>, the Studio equivalent uses DSL expressions in context. This pattern is sourced from the conversion script and verified working:

{
  "type": "input.dropdown",
  "options": {
    "token": "my_token",
    "items": "> frame(label, value) | objects()"
  },
  "context": {
    "formattedConfig": { "number": { "prefix": "" } },
    "label": "> primary | seriesByName(\"<fieldForLabel>\") | renameSeries(\"label\") | formatByType(formattedConfig)",
    "value": "> primary | seriesByName(\"<fieldForValue>\") | renameSeries(\"value\") | formatByType(formattedConfig)"
  },
  "dataSources": { "primary": "ds_my_search" }
}

With mixed static choices (<choice> + search), add statics and formattedStatics:

{
  "options": {
    "items": "> frame(label, value) | prepend(formattedStatics) | objects()"
  },
  "context": {
    "formattedConfig": { "number": { "prefix": "" } },
    "formattedStatics": "> statics | formatByType(formattedConfig)",
    "statics": [["Label A", "Label B"], ["value_a", "value_b"]],
    "label": "> primary | seriesByName(\"<fieldForLabel>\") | renameSeries(\"label\") | formatByType(formattedConfig)",
    "value": "> primary | seriesByName(\"<fieldForValue>\") | renameSeries(\"value\") | formatByType(formattedConfig)"
  }
}

statics is [labelsArray, valuesArray] — not an array of {label, value} objects.