[Canvas] XY_VIS #110430
Labels
Feature:Canvas
Feature:ElasticCharts
Issues related to the elastic-charts library
Feature:ExpressionLanguage
Interpreter expression language (aka canvas pipeline)
impact:high
Addressing this issue will have a high level of impact on the quality/strength of our product.
Meta
Team:Presentation
Presentation Team for Dashboard, Input Controls, and Canvas
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
Adapt
xy
chart fromvis_types/xy
to be reused first atCanvas
.Linked issue: #101377
Description of the problem.
Currently,
xy_vis
function accepts further arguments, which are making this expression not acceptable to be reused somewhere else with some other data source:Full description of the
fn
interface:Input:
Output:
xy_dimension
input arguments:
output arguments:
The biggest issue at this function:
I see the biggest trouble is the format of
xy_dimension
function. Here is my point:This function accepts fields, related to
es aggregations
.List of fields:
I think,
xy_vis
function should avoid taking arguments fromkibana_context
and making decisions, based on that params, instead, it should receive necessary flags and metrics, defined on the top level. It should only visualize the given chart without special logic.I propose:
x
,y
,z
,series
,splitColumn
andsplitRow
fromxy_dimension
to updated form ofxy_dimension
interface, withoutaggType
andparams.*
specifices_aggs
fields.xDomain
andadjustedXDomain
which would return{ min?: number, max?: number, interval?: number }
. I think it will be a good way of supporting the special logic ofxDomain
with a specially defined interval. This param is optional, based on thexy
chart behavior. The decision, which interval to use, will be made on the level oftoExpressionAst
.getConfig
method and further operations. It is very complicated and, I believe, should be moved toxy_vis
function (or renderer, not sure) body.Steps to perform:
chart
andes aggregation attributes
.xy_vis
function (or renderer, not sure).What is the purpose of such changes?
Canvas
is providing the possibility to fetch data not only byes_aggs
but also bydemodata
,es_docs
, etc, so, we should break the connection between displaying and the way of fetching data.function
at theexpressions
don't have access tokibana_context
and todata
plugin, except the top-levelfunction
, as you can mention, so they cannot provide arguments, defined at aggregation execution context.Expression Editor
atCanvas
.Steps to complete:
aggType
.xDomain
to theexpression function
and update types.XY
functions and renderer fromvis_types
tochart_expressions
.XY
functionAPI
. #112935XY
.XY
.XY
.XY
toCanvas
.XY
expression atCanvas
.The text was updated successfully, but these errors were encountered: