Chart Sizes

Small

Medium

Just Right (resizable)

Code

  var spec = {
    "type": "bar", 
    "dataset": {
      "url":"https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "query": {
        "groupByFieldsForStatistics": "Zip",
        "outStatistics": [{
          "statisticType": "sum", 
          "onStatisticField": "Number_of", 
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "mappings":{
        "x": {"field":"Zip","label":"ZIP Code"},
        "y": {"field":"Number_of_SUM","label":"Total Students"}
      }
    }
  }
  var chartS = new Cedar(spec); chartS.show({elementId: "#chart-small"});
  var chartM = new Cedar(spec); chartM.show({elementId: "#chart-medium"});
  var chartL = new Cedar(spec); chartL.show({elementId: "#chart-large"});


  $(function() {
    $( "#resizable" ).resizable({
      resize: function() { chartL.update(); }
    });
  });