Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
documented what was occuring in ambiguous/confusing code section deal…
…ing with non-Financial Market graphs
  • Loading branch information
josephjdkim committed Oct 7, 2019
1 parent b651f4e commit 5cfdf1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions webapp/src/components/PopulationGraph.js
Expand Up @@ -8,26 +8,26 @@ function PopulationGraph(props) {
if (props.loadingData) {
var data = [];
console.log("props.id = " + props.id);
// if not Financial Market
if (props.id !== FMARKET) {
let env = props.env_file["pop_hist"]["pops"];
Object.keys(env).map((group, i_group) => {
console.log(props.env_file["members"][group]["attrs"]["color"]);
/*
* Must determine what this code does and write it more clearly
* if possible.
*/
// populate 'data' array with members of 'pops' with their respective values
return (
data.push({
name: group,
color: props.env_file["members"][group]["attrs"]["color"],
data: {}
}),
// modify 'data' dictionary of each pops member copying 'pops' data
Object.keys(env[group]).map((member, i_member) => {
console.log(member);
return (data[i_group]["data"][member] = env[group][i_member]);
})
);
});
// if Financial Market
} else {
let period = props.env_file["pop_hist"]["periods"];
let data_hist =
Expand Down

0 comments on commit 5cfdf1b

Please sign in to comment.