Esri / cedar

JavaScript Charts for ArcGIS
https://esri.github.io/cedar
257 stars 238 forks source link

add function that converts the chart data/series to a feature set #479

Open tomwayson opened 3 years ago

tomwayson commented 3 years ago

Proposed API:

const { fields, features } = chart.toFeatureSet();

We are doing something similar in the Hub to render a table as an alternative to the chart for a11y.

If there's broader interest, I could add it to cedar itself.

tomwayson commented 3 years ago

Hm... I guess a feature set doesn't always have fields and should at a minimum include the features and geometryType

https://developers.arcgis.com/documentation/common-data-types/featureset.htm

So maybe that's not the best name/concept for this since the thing that's tricky is converting the series() to fields and None of the features would have a geometry, much less a geometryType.

🤷‍♂️