Esri / Esri/cedar

Fully implement support for `specification()` / `definition.specification`

Open
#396 0 comments 0 reactions 1 assignee Claimed by @benstoltz View on GitHub
v1x
Dominant language
Handlebars
Stars
265
Forks
236
PR merge metrics
No merged PRs in 30d

Description

Currently you can pass a specification, but we don't use it. Also, for parity w/ v0, specification should either be a string (URL) or amCharts JSON. If it's a URL, we should fetch it and return the JSON payload. The problem w/ that is, when to do it? As a side effect when you set the specification? During one of the existing async functions (`show()`, `getData()`)? Or do we make render async, which sounds horrible, _but_ we may want to start fetching the built in types ('bar', etc) the way we did in v0 instead of bundling them. An alternative to making the render function async would be for cedar-amcharts to expose an async `fetchSpec(type)` method. Then we can add an async step to `show()` that either resolves the spec JSON that's passed in, or fetches the spec by URL or type. One of the latter two options would be my preference.

We can open a new issue for handling spec as URL if we don't want to deal w/ ^^^ right now.

In Once we have the spec, during render, it should check if one was passed in and use that instead of getting fetching one by type.

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.