diff --git a/projects/project-1/index.html b/projects/project-1/index.html index 4a68bf7..dc16c98 100644 --- a/projects/project-1/index.html +++ b/projects/project-1/index.html @@ -5,10 +5,11 @@ GeoVis - Project 1 + - +
@@ -45,6 +46,9 @@

Aufgabe 2

-
+
+
+
+ \ No newline at end of file diff --git a/projects/project-1/script.js b/projects/project-1/script.js index 5be34bf..6209f8a 100644 --- a/projects/project-1/script.js +++ b/projects/project-1/script.js @@ -135,6 +135,13 @@ google.charts.setOnLoadCallback(drawPieChartMonth) google.charts.setOnLoadCallback(drawLineChart) google.charts.setOnLoadCallback(drawScatterChart) google.charts.setOnLoadCallback(drawBubbleChart) +window.addEventListener('resize', _.debounce(() => { + drawPieChartYear() + drawPieChartMonth() + drawLineChart() + drawScatterChart() + drawBubbleChart() +})) // Tree Map @@ -162,12 +169,12 @@ function loadTreeMap() { ] let data = [ - [...files[0].map(value => value.size)], //Folder 1 - [...files[1].map(value => value.size)] //Folder 2 + files[0].map(value => value.size), //Folder 1 + files[1].map(value => value.size) //Folder 2 ] let labels = [ - [...files[0].map(value => value.name)], //Folder 1 - [...files[1].map(value => value.name)] //Folder 2 + files[0].map(value => value.name), //Folder 1 + files[1].map(value => value.name) //Folder 2 ] Treemap.draw("foldermap", 600, 400, data, labels, {"box": pickColor}) }