Total Suspended Solids
Aluminum
Oil and Grease
nv.addGraph(function() { var testdata = exampleData1(), chart = nv.models.linePlusBarChart() .margin({top: 30, right: 60, bottom: 50, left: 70}) .color(d3.scale.category10().range()) .tooltipContent(function(key, x, y, e, graph) { return '
' + key + '
' + '
' + y + ' at ' + x + '
' });
chart.xAxis .tickFormat(d3.format(',f')) .axisLabel('Total Suspended Solids (mg/L)');
chart.y1Axis .tickFormat(d3.format(',f')) .axisLabel('# of Facilities');
chart.y2Axis .tickFormat(function(d) { return d3.format(',1f')(d) + '%' }) .axisLabel('Mean monthly sea level compared to year 2000 (inches)');
chart.bars .forceY([0]); //chart.lines.forceY([0]);
d3.select('#chart1 svg') .datum(exampleData1()) .transition().duration(500).call(chart);
nv.utils.windowResize(chart.update);
return chart; });
function exampleData1() { return [ { "key" : "Facility Count" , "bar": true, "values" : [ [ 0,0 ] , [ 50,633 ] , [ 100,289 ] , [ 150,138 ] , [ 200,68 ] , [ 250,49 ] , [ 300,12 ] , [ 350,31 ] , [ 400,13 ] , [ 450,12 ] , [ 500,14 ] , [ 550,15 ] , [ 600,3 ] , [ 650,6 ] , [ 700,4 ] , [ 750,3 ] , [ 800,2 ] , [ 850,1 ] , [ 900,2 ] , [ 950,1 ] , [ 1000,5 ] , [ 1050,1 ] , [ 1100,2 ] , [ 1150,2 ] , [ 1200,0 ] , [ 1250,0 ] , [ 1300,4 ] , [ 1350,2 ] , [ 1400,0 ] , [ 1450,2 ] , [ 1500,3 ] , [ 1550,0 ] , [ 1600,2 ] , [ 1650,1 ] , [ 1700,1 ] , [ 1750,1 ] , [ 1800,0 ] , [ 1850,0 ] , [ 1900,0 ] , [ 1950,0 ] , [ 2000,0,]] } , { "key" : "Percent Exceedance" , "values" : [ [ 0,0 ] , [ 50,47.6 ] , [ 100,69.3 ] , [ 150,79.7 ] , [ 200,84.8 ] , [ 250,88.5 ] , [ 300,89.4 ] , [ 350,91.7 ] , [ 400,92.7 ] , [ 450,93.6 ] , [ 500,94.7 ] , [ 550,95.8 ] , [ 600,96.0 ] , [ 650,96.5 ] , [ 700,96.8 ] , [ 750,97.0 ] , [ 800,97.1 ] , [ 850,97.2 ] , [ 900,97.4 ] , [ 950,97.4 ] , [ 1000,97.8 ] , [ 1050,97.9 ] , [ 1100,98.0 ] , [ 1150,98.2 ] , [ 1200,98.2 ] , [ 1250,98.2 ] , [ 1300,98.5 ] , [ 1350,98.6 ] , [ 1400,98.6 ] , [ 1450,98.8 ] , [ 1500,99.0 ] , [ 1550,99.0 ] , [ 1600,99.2 ] , [ 1650,99.2 ] , [ 1700,99.3 ] , [ 1750,99.4 ] , [ 1800,99.4 ] , [ 1850,99.4 ] , [ 1900,99.4 ] , [ 1950,99.4 ] , [ 2000,99.4]] } ].map(function(series) { series.values = series.values.map(function(d) { return {x: d[0], y: d[1] } }); return series; }); }
nv.addGraph(function() { var testdata = exampleData2(), chart = nv.models.linePlusBarChart() .margin({top: 30, right: 60, bottom: 50, left: 70}) .color(d3.scale.category10().range()) .tooltipContent(function(key, x, y, e, graph) { return '
' + key + '
' + '
' + y + ' at ' + x + '
' });
chart.xAxis .tickFormat(d3.format(',1f')) .axisLabel('Total Aluminum (mg/L)');
chart.y1Axis .tickFormat(d3.format(',f')) .axisLabel('# of Facilities');
chart.y2Axis .tickFormat(function(d) { return d3.format(',1f')(d) + '%' });
chart.bars .forceY([0]); //chart.lines.forceY([0]);
d3.select('#chart2 svg') .datum(exampleData2()) .transition().duration(500).call(chart);
nv.utils.windowResize(chart.update);
return chart; });
function exampleData2() { return [ { "key" : "Facility Count" , "bar": true, "values" : [ [ 0,64 ] , [ 0.25,36 ] , [ 0.5,23 ] , [ 0.75,15 ] , [ 1,19 ] , [ 1.25,11 ] , [ 1.5,13 ] , [ 1.75,10 ] , [ 2,3 ] , [ 2.25,5 ] , [ 2.5,7 ] , [ 2.75,5 ] , [ 3,0 ] , [ 3.25,3 ] , [ 3.5,1 ] , [ 3.75,1 ] , [ 4,1 ] , [ 4.25,3 ] , [ 4.5,1 ] , [ 4.75,1 ] , [ 5,1 ] , [ 5.25,2 ] , [ 5.5,0 ] , [ 5.75,2 ] , [ 6,1 ] , [ 6.25,2 ] , [ 6.5,0 ] , [ 6.75,3 ] , [ 7,1 ] , [ 7.25,1 ] , [ 7.5,1 ] , [ 7.75,0 ] , [ 8,1 ] , [ 8.25,1 ] , [ 8.5,1 ] , [ 8.75,2 ] , [ 9,2 ] , [ 9.25,0 ] , [ 9.5,1 ] , [ 9.75,2 ] , [ 10,0 ] , [ 10.25,0 ] , [ 10.5,0 ] , [ 10.75,0 ] , [ 11,1 ] , [ 11.25,0 ] , [ 11.5,2 ] , [ 11.75,0 ] , [ 12,0 ] , [ 12.25,0 ] , [ 12.5,0 ] , [ 12.75,0 ] , [ 13,0 ] , [ 13.25,1 ] , [ 13.5,1 ] , [ 13.75,1 ] , [ 14,0 ] , [ 14.25,0 ] , [ 14.5,0 ] , [ 14.75,1 ] , [ 15,0 ] , [ 15.25,0 ] , [ 15.5,0 ] , [ 15.75,0 ] , [ 16,0 ] , [ 16.25,0 ] , [ 16.5,0 ] , [ 16.75,0 ] , [ 17,0 ] , [ 17.25,0 ] , [ 17.5,0 ] , [ 17.75,0 ] , [ 18,0 ] , [ 18.25,0 ] , [ 18.5,1 ] , [ 18.75,0 ] , [ 19,0 ] , [ 19.25,0 ] , [ 19.5,0 ] , [ 19.75,0 ] , [ 20,0,] ] } , { "key" : "Percent Exceedance" , "values" : [ [ 0,0 ] , [ 0.1,24.52 ] , [ 0.25,38.31 ] , [ 0.5,47.13 ] , [ 0.75,52.87 ] , [ 1,60.15 ] , [ 1.25,64.37 ] , [ 1.5,69.35 ] , [ 1.75,73.18 ] , [ 2,74.33 ] , [ 2.25,76.25 ] , [ 2.5,78.93 ] , [ 2.75,80.84 ] , [ 3,80.84 ] , [ 3.25,81.99 ] , [ 3.5,82.38 ] , [ 3.75,82.76 ] , [ 4,83.14 ] , [ 4.25,84.29 ] , [ 4.5,84.67 ] , [ 4.75,85.06 ] , [ 5,85.44 ] , [ 5.25,86.21 ] , [ 5.5,86.21 ] , [ 5.75,86.97 ] , [ 6,87.36 ] , [ 6.25,88.12 ] , [ 6.5,88.12 ] , [ 6.75,89.27 ] , [ 7,89.66 ] , [ 7.25,90.04 ] , [ 7.5,90.42 ] , [ 7.75,90.42 ] , [ 8,90.80 ] , [ 8.25,91.19 ] , [ 8.5,91.57 ] , [ 8.75,92.34 ] , [ 9,93.10 ] , [ 9.25,93.10 ] , [ 9.5,93.49 ] , [ 9.75,94.25 ] , [ 10,94.25 ] , [ 10.25,94.25 ] , [ 10.5,94.25 ] , [ 10.75,94.25 ] , [ 11,94.64 ] , [ 11.25,94.64 ] , [ 11.5,95.40 ] , [ 11.75,95.40 ] , [ 12,95.40 ] , [ 12.25,95.40 ] , [ 12.5,95.40 ] , [ 12.75,95.40 ] , [ 13,95.40 ] , [ 13.25,95.79 ] , [ 13.5,96.17 ] , [ 13.75,96.55 ] , [ 14,96.55 ] , [ 14.25,96.55 ] , [ 14.5,96.55 ] , [ 14.75,96.93 ] , [ 15,96.93 ] , [ 15.25,96.93 ] , [ 15.5,96.93 ] , [ 15.75,96.93 ] , [ 16,96.93 ] , [ 16.25,96.93 ] , [ 16.5,96.93 ] , [ 16.75,96.93 ] , [ 17,96.93 ] , [ 17.25,96.93 ] , [ 17.5,96.93 ] , [ 17.75,96.93 ] , [ 18,96.93 ] , [ 18.25,96.93 ] , [ 18.5,97.32 ] , [ 18.75,97.32 ] , [ 19,97.32 ] , [ 19.25,97.32 ] , [ 19.5,97.32 ] , [ 19.75,97.32 ] , [ 20,97.32,] ] } ].map(function(series) { series.values = series.values.map(function(d) { return {x: d[0], y: d[1] } }); return series; }); }
nv.addGraph(function() { var testdata = exampleData3(), chart = nv.models.linePlusBarChart() .margin({top: 30, right: 60, bottom: 50, left: 70}) .color(d3.scale.category10().range()) .tooltipContent(function(key, x, y, e, graph) { return '
' + key + '
' + '
' + y + ' at ' + x + '
' });
chart.xAxis .tickFormat(d3.format(',f')) .axisLabel('Oil and Grease (mg/L)');
chart.y1Axis .tickFormat(d3.format(',f')) .axisLabel('# of Facilities');
chart.y2Axis .tickFormat(function(d) { return d3.format(',1f')(d) + '%' });
chart.bars .forceY([0]); //chart.lines.forceY([0]);
d3.select('#chart3 svg') .datum(exampleData3()) .transition().duration(500).call(chart);
nv.utils.windowResize(chart.update);
return chart; });
function exampleData3() { return [ { "key" : "Facility Count" , "bar": true, "values" : [ [ 0,161] , [5,545] , [10,310] , [15,65] , [20,22] , [25,12] , [30,10] , [35,7 ] , [ 40,5 ] , [ 45,2 ] , [ 50,5 ] , [ 55,12 ] , [ 60,0 ] , [ 65,2 ] , [ 70,0 ] , [ 75,0 ] , [ 80,1 ] , [ 85,0 ] , [ 90,0 ] , [ 95,0 ] , [ 100,0 ] ] } , { "key" : "Percent Exceedance" , "values" : [ [ 0,0 ] , [ 0.1,13.81 ] , [ 5,60.55 ] , [ 10,87.14 ] , [ 15,92.71 ] , [ 20,94.60 ] , [ 25,95.63 ] , [ 30,96.48 ] , [ 35,97.08 ] , [ 40,97.51 ] , [ 45,97.68 ] , [ 50,98.11 ] , [ 55,99.14 ] , [ 60,99.14 ] , [ 65,99.31 ] , [ 70,99.31 ] , [ 75,99.31 ] , [ 80,99.40 ] , [ 85,99.40 ] , [ 90,99.40 ] , [ 95,99.40 ] , [ 100,99.40,] ] } ].map(function(series) { series.values = series.values.map(function(d) { return {x: d[0], y: d[1] } }); return series; }); }