Skip to content

Commit

Permalink
Added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rocking42 committed Jan 30, 2017
1 parent fa39a13 commit dd02bf2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions app/donatingD3.js
Expand Up @@ -97,7 +97,7 @@ export function findStackedData(country, ...allData) {
return stack(dataResult);
}


// Update stack data
export function displayNewStack(country, ...dataSources) {
const dataset2 = findStackedData(country, ...dataSources);

Expand All @@ -116,7 +116,7 @@ export function displayNewStack(country, ...dataSources) {
.attr("fill", (d, i) => colorDonate(i) )
}


// Set up and display the stack
export function showStack(stackData) {
//New array with all the years, for referencing later
const yearsDonate = ["1971","1972","1973","1974","1975","1976","1977","1978","1979","1980","1981","1982","1983","1984","1985","1986","1987","1988","1989","1990","1991","1992","1993","1994","1995","1996","1997","1998","1999","2000","2001","2002","2003","2004","2005","2006","2007"];
Expand Down Expand Up @@ -152,7 +152,7 @@ export function showStack(stackData) {
//Make a path for each country
var selection = svgDonate.selectAll("path")
.data(stackData)

// Create Stack paths
var paths = selection.enter()
.append("path")
.attr("class", "area")
Expand Down Expand Up @@ -191,7 +191,7 @@ export function showStack(stackData) {
.attr("class", "y axis")
.attr("transform", "translate(" + padding[3] + ",0)")
.call(yAxisDonate);

// Append stack title
svgDonate.append("text")
.attr("text-anchor", "end")
.attr("x", w - 180)
Expand Down
2 changes: 1 addition & 1 deletion app/events.js
Expand Up @@ -2,7 +2,7 @@ const THREE = require("three");
import { debounce } from './utils';

export let raycaster = new THREE.Raycaster();

// Function that adds event listeners to the globe
export function setEvents(camera, items, type, wait) {

let listener = function(event) {
Expand Down
2 changes: 1 addition & 1 deletion app/helpers.js
Expand Up @@ -55,7 +55,7 @@ export function convertToXYZ(point, radius) {
z: z
};
}

// Get geographic information from country features
export var geodecoder = function(features) {

let store = {};
Expand Down
1 change: 1 addition & 0 deletions app/main.js
Expand Up @@ -232,6 +232,7 @@ function ready(error, results) {
camera,
renderer.domElement
);
// TODO: Need to reduce the size of the layers
// Texture layer load
// Test browser
if(!navigator.userAgent.match(/Chrome/)) {
Expand Down
4 changes: 2 additions & 2 deletions app/receivingD3.js
Expand Up @@ -59,7 +59,7 @@ export function findLineInfo(country, data, aidType) {
});
return countryData
}

// Display new data given to the line graph
export function changeCountryLine(country, data, aidType) {
const thisData = findLineInfo(country, data, aidType);
y.domain([0, d3.max(thisData, function(d) { return d.aid / 1000000; })]);
Expand All @@ -82,7 +82,7 @@ export function changeCountryLine(country, data, aidType) {
svgRecieve.selectAll("g.y.axis").remove();
svgRecieve.append("g").attr("class", "y axis").call(yAxisReceive);
}

// Set-up and display the initial line graph
export function showLine(countryData) {
// Scale the range of the datas
x.domain(d3.extent(countryData, function(d) {
Expand Down
1 change: 0 additions & 1 deletion app/template.html
Expand Up @@ -9,7 +9,6 @@
<link rel="stylesheet" href="../assets/newLoader.css">
<link rel="stylesheet" href="../assets/style.css">
<link rel="icon" type="image/png" sizes="32x32" href="../assets/favicon/world32.png">
<!-- <link rel="icon" type="image/png" sizes="96x96" href="../assets/favicon/favicon-96x96.png"> -->
<link rel="icon" type="image/png" sizes="16x16" href="../assets/favicon/world16.png">
<title>Document</title>
</head>
Expand Down

0 comments on commit dd02bf2

Please sign in to comment.