Skip to content

Commit

Permalink
added q3 axis labels
Browse files Browse the repository at this point in the history
  • Loading branch information
mtolchi committed Nov 5, 2023
1 parent ad46a1c commit 500e479
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions javascript/q3.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ d3.csv("/DataVizDashboard/javascript/profit_by_genre.csv").then(function(dataset
.style("transform", `translateX(${dimensions.margin.left}px`)
.attr("color", "black")

svg.append("text")
.text("Budget")
.attr("x", dimensions.width / 2)
.attr("y", dimensions.height - 5)
.attr("text-anchor", "middle")
.attr("font-size", "14px")

svg.append("text")
.text("Revenue")
.attr("x", -dimensions.height / 2)
.attr("y", dimensions.margin.left / 3)
.attr("text-anchor", "middle")
.attr("font-size", "14px")
.attr("transform", "rotate(-90)")

const legend = d3.select("#q3legend")
.style("width", dimensions.width)
.style("height", dimensions.height/6)
Expand Down

0 comments on commit 500e479

Please sign in to comment.