hw6 first commit

This commit is contained in:
2019-10-29 11:19:51 -06:00
parent 778fe73e4a
commit 501727baed
65 changed files with 20108 additions and 26 deletions

20
hw6/public/js/script.js Normal file
View File

@@ -0,0 +1,20 @@
let tooltip = new Tooltip();
let votePercentageChart = new VotePercentageChart(tooltip);
let tileChart = new TileChart(tooltip);
let shiftChart = new ShiftChart();
let electoralVoteChart = new ElectoralVoteChart(shiftChart);
// Load the data corresponding to all the election years.
// Pass this data and instances of all the charts that update on year
// selection to yearChart's constructor.
d3.csv("data/yearwiseWinner.csv").then(electionWinners => {
console.log(electionWinners);
let yearChart = new YearChart(electoralVoteChart, tileChart,
votePercentageChart, electionWinners);
yearChart.update();
});