Cedar Base Fiddle

Fork this fiddle to try out Esri's Cedar charting library http://esri.github.io/cedar/

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega/2.6.1/vega.min.js"></script>
<script src="https://unpkg.com/arcgis-cedar/dist/cedar.js"></script>
<div id="chart"></div>

JavaScript

// 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'
});