var chartRadius = Math.min(screen.width, screen.height)/4;

var chart = circularHeatChart()
    .segmentHeight(chartRadius/5)
    .innerRadius(chartRadius/5)
    .numSegments(12)
    .radialLabels(null)
    .segmentLabels(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"])
    .margin({top: 20, right: 20, bottom: 20, left: 20});


/* An array of objects */
// data = [];
// for(var i=0; i<48; i++) {
//     data[i] = {title: "Segment "+i, value: Math.round(Math.random()*100)};
// }

d3.json("seasonaldata.json", function(data) {
  var stats =[data];
  console.log(stats[0]);
});

chart.accessor(function(d) {return d.value;})
    .radialLabels(null)
    .segmentLabels(null);
d3.select('#circularHeatChart')
    .selectAll('svg')
    .data([stats])
    .enter()
    .append('svg')
    .call(chart);

/* Add a mouseover event */
d3.selectAll("#circularHeatChart path").on('mouseover', function() {
	var d = d3.select(this).data()[0];
    d3.select("#info").text(d.title + ' has value ' + d.value);
});
d3.selectAll("#circularHeatChart svg").on('mouseout', function() {
    d3.select("#info").text('');
});

@@ -502,16 +502,38 @@
 ;%0A// %7D%0A%0A
+var data; // a global%0A
 d3.json(
@@ -566,64 +566,77 @@
 ion(
-data) %7B%0A  var stats =%5Bdata%5D;%0A  console.log(stats%5B0%5D);%0A%7D)
+error, json) %7B%0A  if (error) return console.warn(error);%0A  data = json
 ;%0A%0Ac
@@ -799,13 +799,12 @@
 ta(%5B
-stats
+data
 %5D)%0A 

update radial heat chart