Edit in JSFiddle

// This fiddle is based on http://esri.github.io/cedar/tutorial/

// create an instance of a Cedar chart
// see http://esri.github.io/cedar/api/ for an explanation of these properties
var chart = new Cedar({
  "type": "bar",
  "datasets": [{
      "url":"https://maps7.arcgisonline.com/arcgis/rest/services/Veterans_Proportion_From_Population/MapServer/0",
    "query": {
      "orderByFields": "TotPop DESC"
    }
  }],
  "series": [
    {
      "category": {"field":"STATE_NAME","label":"US State"},
      "value": {"field":"TotPop","label":"Population"}
    }
  ]
});

// show the chart and bind it to the DOM
chart.show({
  elementId: '#chart'
});
<div id="chart"></div>

External resources loaded into this fiddle: