Esri / Esri/cedar

Aggregate example not working in an OD/Hub page?

Open
#274 5 comments 0 reactions 0 assignees View on GitHub
v0x
Dominant language
Handlebars
Stars
265
Forks
236
PR merge metrics
No merged PRs in 30d

Description

I am trying to get the [Time Aggregation sample](http://esri.github.io/cedar/examples/time-aggregation.html) to work in an ArcGIS Open Data page, chart card.

Im sure it is something simple, but the below is not working for me. I have also tried using the same feature service as your sample, but still no luck.

```
{
"type": "bar",
"datasets": [
{
"url": "https://services1.arcgis.com/vHnIGBHHqDR6y0CR/ArcGIS/rest/services/JustCrash2017/FeatureServer/0",
"query": {
"groupByFieldsForStatistics": "EXTRACT(MONTH from accident_2)",
"outStatistics": [{
"statisticType": "sum",
"onStatisticField": "inj_or_fat",
"outStatisticFieldName": "inj_or_fat_sum"
}]
},
"mappings":{
"x": {"field":"EXPR_1", "label": "Date"},
"y": {"field":"inj_or_fat_sum", "label": "inj_or_fat_sum"},
"sort":"EXTRACT(MONTH from accident_2)"
}
}
]
}
```

I can get it to [work fine as a standalone HTML file using my own hosted feature service](http://s3-ap-southeast-2.amazonaws.com/languagesofaustralia.com/SimonJacksonFiles/cedar_test.html) (which I could embed into the page).

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.