Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
doc registerOptions
Browse files Browse the repository at this point in the history
Docs for new Event in 5.24
  • Loading branch information
Richard Czechowski authored Oct 2, 2018
1 parent b472a23 commit 4b6682d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,3 +449,28 @@ this.trigger("limit", [20]);
- `loadingEnd`

Mark the visualization as no longer loading.

- `registerOptions` (Looker 5.24+)

Allows visualizations to register additional options after the visualization has been registered:

```
update: function(data, element, config, queryResponse, details){
options = {}
// Create an option for each measure in your query
queryResponse.fields.measure_like.forEach(function(field) {
id = "color_" + field.name
options[id] =
{
label: field.label_short + " Color",
default: "#8B7DA8",
section: "Style",
type: "string",
display: "color"
}
})
this.trigger('registerOptions', options) // register options with parent page to update visConfig
...
}
});
```

0 comments on commit 4b6682d

Please sign in to comment.