Feature: array & objects are difficult to handle
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- tooling
Research direction
The issue names no files, tests, or entry points; start by locating the template-syntax evaluator and its handling of arrays and objects. Reproduce the provided labels selector example, then define whether completion means filtering array data by index without registering custom functions.
Written by the indexing model from the issue text.
Description
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:
const spec = {
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 labels selector, but it is difficult to handle using only template syntax.
- Dominant language
- TypeScript
- Stars
- 26
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from antvis/expr
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
security
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
IBM/node-sdk-core#373 ·
-
e2e-failure ready-to-code
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 88/100