You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i write some demo for expr, i meet a problem:
If you don't use register to define your own functions and only use template syntax, it is difficult to handle arrays and objects.Here is an example:
constspec={type: 'line',height: 400,width: 540,legend: false,y: 300,encode: {x: 'name',y: 'value'},scale: {y: {independent: true}},labels: [{text: '{a.value}',// here is the problem, how to filter this array 🤔selector: '{a}',},],axis: {y: {position: 'right',grid: null,},},},}
I want to filter only the data of a certain index in the labelsselector, but it is difficult to handle using only template syntax.
The text was updated successfully, but these errors were encountered:
While using expr to provide template capabilities, open a way to get register capabilities for your developers
We will extend a plugin to provide some array and object processing toolkits that are safer and more suitable for expr template syntax. This toolkit can be provided by us as a dependent package, which can be optionally integrated without increasing the size of the core code.
Uh oh!
There was an error while loading. Please reload this page.
When i write some demo for
expr
, i meet a problem:If you don't use
register
to define your own functions and only use template syntax, it is difficult to handlearrays
andobjects
.Here is an example:I want to filter only the data of a certain index in the
labels
selector
, but it is difficult to handle using only template syntax.The text was updated successfully, but these errors were encountered: