Elements: Circle, Ellipse, and Rectangle
Learn the basics of the circle, ellipse, and rectangle elements in D3.
We'll cover the following...
What is an element?
We will begin by describing what we mean when we talk about an “element.”
There is considerable scope for confusion when talking about elements on a web page. Are we talking about HTML elements, SVG elements, or something different?
In fact, we are going to be describing a subset of SVG elements. Specifically, a collection of common shapes and objects which include circles, ellipses, rectangles, lines, polylines, polygons, text, and paths.
“Text?” I hear you say. “Doesn’t sound like a shape.” I suppose it depends on how you think of it. We can use text in different ways in D3. But for this particular exercise, we can regard text ...