Multiple Charts


  var dataset = {
    "url":"https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
    "query": {
      "groupByFieldsForStatistics": "District",
      "outStatistics": [{
        "statisticType": "sum", 
        "onStatisticField": "Number_of", 
        "outStatisticFieldName": "Number_of_SUM"
      }]
    },
    "mappings":{
      "x": {"field":"District","label":"District"},
      "y": {"field":"Number_of_SUM","label":"Student Number_of"},
      "label": {"field":"District","label":"District"}
    }
  };

  var chart1 = new Cedar({"type":"bar", "dataset": dataset});

  chart1.show({
    elementId: "#chart1",
  });  

  dataset.mappings.radius = 180;

  var chart2 = new Cedar({"type":"pie", "dataset": dataset});

  chart2.show({
    elementId: "#chart2",
    width: 400,
    height: 400
  });