apache / apache/echarts

[Feature] Support nested property access for `encode`

Open
#19,139 1 comment 1 reaction 0 assignees View on GitHub
en new-feature topic: dataset
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

e.g. consider this option:

```ts
{
dataset: [{
id: "42",
source: [{
x: 42,
y: {
type: "range",
resolvedMin: { value: 20, inclusive: true },
resolvedMax: { value: 24, inclusive: true },
}
}]
}],
series: [{
type: 'line',
datasetId: '42',
encode: {
x: 'x',
y: 'y.resolvedMin.value'
}
}]
}
```

### What does the proposed API look like?

I'd like to be able to use `y.resolvedMin.value` as a path in a JS object such as in lodash's get: https://lodash.com/docs/4.17.15#get

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.