< Back Home
  
    var config1 = {
      "type": "timeline",
      "url": "https://services.arcgis.com/bkrWlSKcjUDFDtgw/arcgis/rest/services/It's_a_Tornado_Map/FeatureServer/0",
      "query": {
        "orderByFields": "Date"
      },
      "mappings": {
        "category": {"field": Date, "label": Date},
        "series": [
          {
            "field": "Injuries",
            "label": "Injuries"
          }
        ]
      },
      "overrides": {
        "graphs": [{
          "balloonText": "[[value]]"
        }]
      },
      // a transformation that will be applied to each returned feature
      featureTransform: function (feature) {
        console.log('feature.attributes.Date', feature.attributes.Date, new Date(feature.attributes.Date));
        return {
          Injuries: feature.attributes.Injuries,
          "Date": new Date(feature.attributes.Date)
        };
      }
    }

    showChart("chartdiv1", config1);