Time Aggregation Example

var chart = new Cedar({"type":"bar"});

var dataset = {
  "url":"https://services.arcgis.com/bkrWlSKcjUDFDtgw/arcgis/rest/services/It's_a_Tornado_Map/FeatureServer/0",
  "query": {
    "groupByFieldsForStatistics": "EXTRACT(YEAR from Date)",
    "outStatistics": [{
      "statisticType": "sum",
      "onStatisticField": "FATALITIES",
      "outStatisticFieldName": "FATALITIES_SUM"
    }]
  },
  "mappings":{
    "x": {"field":"EXPR_1", "label": "Date"},
    "y": {"field":"FATALITIES_SUM", "label": "Fatalities"},
    "sort":"EXTRACT(YEAR from Date)"
  }
};

chart.tooltip = {
  "title": "{EXPR_1}",
  "content": "{FATALITIES_SUM} fatalities"
};

chart.dataset = dataset;
//chart.dataset.mappings.sort = "DATE";
chart.show({
  elementId: "#chart",
  autolabels: true
});
Note: using SQL in group and sort is only supported in ArcGIS Server 10.5