koopjs / winnow

Deprecated
Apache License 2.0
90 stars 18 forks source link

Split groupByFieldsForStatistics by comma #127

Closed ahamilt closed 5 years ago

ahamilt commented 5 years ago

ArcGIS Operations Dashboard allows you to create a Serial Chart, grouping the data one field, and splitting the bars by a second. The queries it sends to the feature service are comma separated. This was being treated by winnow as a single field name containing a comma, instead of splitting the parameter into a list of field names.

Updated the normalizeGroupBy function to split the parameter with the comma character. (I've done this for both 'groupBy' and 'groupByFieldsForStatistics', could maybe restrict it to only do it for the Esri 'groupByFieldsForStatistics' property?)

Added unit test to cover it.

rgwozdz commented 5 years ago

@ahamilt - can you resolve the conflicts caused by the last merge.