Esri / cedar

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

Capability to Convert Between Units? #449

Open pmacMaps opened 6 years ago

pmacMaps commented 6 years ago

I'm starting to experiment with this library, as I think our County's Planning office might benefit from it.

We have some web services that have a shape area field in the units of square feet. For presentation purposes, acres would be a more meaningful unit. Is there a way to perform this calculation while constructing a chart?

Or is this solution to create a field on the data set representing area in acres?

pmacMaps commented 6 years ago

Along with this is whether or not you can even use the built-in shape area or shape length fields? I keep getting errors when trying to use the Shape.STArea() field as the onStatisticField property.

tomwayson commented 6 years ago

Or is this solution to create a field on the data set representing area in acres?

That could be one way to do it that would probably get around the issue you have w/

getting errors when trying to use the Shape.STArea() field as the onStatisticField property.

Alternatively, if you are able to get that query working, and you know the conversion function, you could use the pretty much undocumented .transform() function.