Replies: 2 comments
-
cc canvas team @clintandrewhall @crob611 |
Beta Was this translation helpful? Give feedback.
0 replies
-
we discussed this with canvas team and reached a conclusion that they will define a new event canvas app will listen for this event and update the expression accordingly in their app store (without actually rerunning the expression) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
expression has a few different inputs:
context
is the input provided to the first function inside expression, normally nullsearchContext
is the input available to all of the functions inside expression and contains filters, query, timerange.variables
can be any additional input (theme, etc) and can be set/get from within expression. Generally they can be subdivided in two subtypes:set_var
function and should only be read from within expression by user usingvar
function.searchContext
as we generally don't want to manipulate them from expression and all the expression functions should take them into account. These could be possibly updated from renderers.Its common that an action inside the rendered chart might require to update one of the inputs and expression should be reevaluated. For example clicking on a slice inside pie might add a new filter.
On dashboard, visualize, lens this is handled so that renderers emit a filter event
handlers.event('filter', ...)
which in turn fires UiAction which generates the filter and adds it to filterManager. Apps are subscribed to filterManager and are notified about the update to the filters and in turn re-run the expression (either directly or by updating the embeddable input with new filters)Canvas team has expressed desire to have renderers directly affect the expression.
Currently renderers have 3 handlers available which might partially satisfy the requirements:
handlers.event
is used to emit events from renderers. Currently we haven't fully established what events should be supported (but we should as both the renderers and consuming apps need to know about them) but we supportfilter
andbrush
in most of renderers and consuming appshandlers.reload
will rerun the expression, but currently there is no way to affect the inputshandlers.upddate(newExpession?, newParams?)
will update expression and/or params and rerun expression. This seems to powerful and dangerous as anything can be changedWhat parts of input is canvas team looking to change from renderers ?
Beta Was this translation helpful? Give feedback.
All reactions