How to create v0 scatter example in v1
- Dominant language
- Handlebars
- Stars
- 265
- Forks
- 236
- PR merge metrics
- No merged PRs in 30d
Description
I'm not sure how [make this scatterplot](https://esri.github.io/cedar/examples/scatter-def-url.html) in amCharts using the v1 API:

Ideally what we want is to be able to run one query, get all the results back and tell amCharts to assign a color from a pallet based on the `Type` field. However, when I tested amChart's [`colorField`](https://docs.amcharts.com/3/javascriptcharts/AmGraph) it did not work that way - it appears that `colorField` has to contain actual color values.
So the next best thing we could do is use a transform function (once we decide what to do in #285) to create a synthetic `colorField` on the fly that has a unique color for each `Type`. However, if we want existing v0 charts defined using the above definition to work in v1, then can't require users to go back and explicitly add a transform to their charts. Instead we'd need to infer that we need to do a transform internally based on the existence of `series.color.field`.
Also note that the v1 scatterplot spec currently doesn't even have a legend. I'm not even sure that if we used internal logic to generate a `colorField` that it would show up in the chart's legend as above (w/o generating a custom legend). We may need an actual series for each `Type`. So now that internal logic may need to not only run a transform that would create a `colorField` out of the 'Type' field, but also create multiple graphs for this single series - each w/ it's own color
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.