Esri / Esri/cedar

better definition API for passing spec through to charting library

Open
#400 0 comments 0 reactions 0 assignees View on GitHub
v1x
Dominant language
Handlebars
Stars
265
Forks
236
PR merge metrics
No merged PRs in 30d

Description

Currently the way we signal that the specification should be passed through wholesale to AmCharts (i.e. don't inject `datasets`/`series`) is by specifying `type: 'custom', specification: aFullyBakedAmChartsConfig`. That is confusing though, in all other cases (i.e. `type !== 'custom'`) `type` is used as a shorthand for one of the built-in specifications (i.e. _instead of_ `specification`).

I suggest we do _one_ of the following:
1. We use a new top level `definition` property like `passThrough: true` or `processSpecification: false`
1. We check for the existence of `datasets && series` - if they aren't there, don't process the specification, just pass it along. We could later maybe even support just `specification && `datasets` - so just inject the data, but don't process the series
1. We re-introduce the v0 concept that specifications can have a top level property like `template` - if that is present, then process the template, otherwise pass it through to the underlying charting library wholesale. That would require

For the latter, we probably want to think about what role adlib may play in Cedar's future.

I'm leaning toward the second option.

Thoughts @ajturner, @benstoltz?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.