echarts [Feature] Support nested property access for encode

ukdjmx9f  于 6个月前  发布在  Echarts
关注(0)|答案(1)|浏览(53)

What problem does this feature solve?

e.g. consider this option:

{
  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

eanckbw9

eanckbw91#

We don't have a recent plan to support this but a pull request is welcomed. Extra libraries should not be relied on.

相关问题