Review code sections from previous lesson.
svg.selectAll("rect")
svg.selectAll("text")
d3.scaleLinear()
var svg = d3.select("body")
.append("svg")
Create 3 new files:
- html
- javascript
- css
link the javascript and css files to your html
<link rel="stylesheet" href="css/curves.css">
Add rectangle with start point of 100, 100 roughly 300 x 100 pixels with a light pastel background.
Create text with starting point of 100, 100
svg.append("text")
.text("hello")
.attr("x", "100")
.attr("y", "100");
In the css file, create a class called, "curve".
Example:
.curve {
font-size: 100px;
font-family: sans-serif
}
In the Javascript file, attach the class attribute to the text
.attr("class", "curve")
.attr("transform", "rotate(45)")
.attr("transform", "rotate(45, 100, 100)");
simulate y axis label Use negative degree to get upright






