Drilldown Conversion
Classic <drilldown> blocks convert to entries in a viz’s eventHandlers array.
When to load
Load when the classic XML has a <drilldown> element inside a viz (<chart>, <table>, <single>, <event>, <map>).
Supported conversions
<set token>→drilldown.setToken.<unset token>→drilldown.unsetTokens.<condition field="...">(field-scoped) →drilldown.setTokenwithfields.<link>navigation →drilldown.linkToSearch/linkToReport/linkToDashboard/customUrl.<option name="drilldown">(cell/all/row) →options.drilldownon the viz.
Unsupported — warn or ask
<drilldown><condition value="...">(value-based routing) — skip with warning.<drilldown><eval>(computed drilldown targets) — skip with warning.
Conversion rules
<set token> → drilldown.setToken
<set token="X">$row.Y$</set>→{ "token": "X", "key": "row.Y.value" }<set token="X">$click.value$</set>→{ "token": "X", "key": "value" }<set token="X">staticValue</set>→{ "token": "X", "value": "staticValue" }<option name="drilldown">cell</option>/all/row→ carry over asoptions.drilldownon the viz.
<unset token> → drilldown.unsetTokens
- Multiple
<unset>elements → collect all names into onetokenNamesarray. - Same drilldown with both
<set>and<unset>→ emit both handler types in theeventHandlersarray.
<condition field="..."> → field-scoped setToken
- Maps the
fieldto thefieldsoption ondrilldown.setToken. - Multiple
<condition field>blocks → onedrilldown.setTokenper block. - A
<condition>with nofieldattribute (catch-all) → emit withoutfields.
<link> → navigation handler
Parse the href to determine type:
| Href pattern | Studio handler type |
|---|---|
search?q=... | drilldown.linkToSearch |
/app/<app>/report?s=... | drilldown.linkToReport |
/app/<appName>/<dashboardName> | drilldown.linkToDashboard |
http:// or https:// | drilldown.customUrl |
linkToSearchtype: "auto"(default): derives search from the viz’s datasource with click context. Use when the classic query contains$row.*$or other click tokens.linkToSearchtype: "custom": usesqueryverbatim. Only for fully static queries with no click tokens.linkToDashboard/linkToReportquery-string token extraction — strip$delimiters from token values:?form.<token>=$click.value$→{ "token": "form.<token>", "value": "click.value" }?form.<token>=$row.<field>.value$→{ "token": "form.<token>", "value": "row.<field>.value" }- Static:
?form.<token>=someValue→{ "token": "form.<token>", "value": "someValue" } - No query params →
"tokens": []
Examples
<set token> — setToken
"eventHandlers": [
{
"type": "drilldown.setToken",
"options": {
"tokens": [
{ "token": "<token_name>", "key": "row.<field>.value" }
]
}
}
]<unset token>
{
"type": "drilldown.unsetTokens",
"options": { "tokenNames": ["X"] }
}<condition field="..."> — field-scoped
<drilldown>
<condition field="host">
<set token="selected_host">$click.value$</set>
</condition>
</drilldown>
→
{
"type": "drilldown.setToken",
"options": {
"fields": ["host"],
"tokens": [{ "token": "selected_host", "key": "value" }]
}
}drilldown.linkToSearch
{
"type": "drilldown.linkToSearch",
"options": { "type": "auto", "newTab": true }
}drilldown.linkToReport
{
"type": "drilldown.linkToReport",
"options": { "app": "<app>", "report": "<decoded report name>", "newTab": true }
}drilldown.linkToDashboard
{
"type": "drilldown.linkToDashboard",
"options": {
"app": "<appName>",
"dashboard": "<dashboardName>",
"newTab": true,
"tokens": [{ "token": "<token>", "value": "<clickToken>" }]
}
}drilldown.customUrl
{
"type": "drilldown.customUrl",
"options": { "url": "<href verbatim>", "newTab": true }
}Report notes
- List every
<drilldown><condition value="...">(value-based routing) and<drilldown><eval>(computed target) as a skipped feature. - Note any
<link>whose href pattern did not match a known handler type and was skipped or approximated.