Rectangle
A rectangle is a planar quadrilateral with four right angles and opposite sides of equal length.
D3.js in Action, Third Edition
An SVG rect element is a rectangular graphical element defined by position, width, and height attributes.
- How it is used
- Builds SVG shapes for chart marks, tooltip backgrounds, and temporary responsive-grid outlines.
- How deep it goes
- Works through positioning, styling, D3 attribute setting, and data-driven dimensions; also contrasts Canvas drawing commands.
- Examples
- Uses a gallery of SVG shapes, a salary histogram, a responsive grid, and a temperature tooltip.
- What you can do after
- Build it from scratch as an SVG shape, then apply it via D3 to data-bound histogram bins.
Read how D3.js in Action, Third Edition explains Rectangle →
Data Storytelling with Altair and AI
A rectangle is a four-sided graphical shape used as a visual mark to cover a region of a chart.
- How it is used
- Uses rectangles to highlight meaningful chart intervals and organize proposed actions into visual roadmaps.
- How deep it goes
- Builds rectangles from coordinate DataFrames, encodes their bounds, and extends the pattern to labeled, connected sets.
- Examples
- Uses a salmon-sales decline and a dogs-and-cats campaign roadmap as concrete rectangle examples.
- What you can do after
- Builds contextual highlights and labeled roadmaps with Python, pandas, and Altair.
Read how Data Storytelling with Altair and AI explains Rectangle →
Advanced Algorithms and Data Structures
A rectangle is a planar quadrilateral with four right angles used here as the spatial region associated with an R-tree node.
- How it is used
- Uses rectangles to bound points and child regions within an R-tree.
- How deep it goes
- Defines rectangles through coordinate extrema and smallest containment, extending the idea to axis-aligned hyper-rectangles.
- Examples
- Illustrates rectangles with city-map points, nested bounding regions, and overlapping regions on a Cartesian plane.
- What you can do after
- Evaluate R-tree regions by identifying the minimum coordinate-aligned rectangle enclosing points or child rectangles.
Read how Advanced Algorithms and Data Structures explains Rectangle →
Also covered in
- Geometry for Programmers
- Get Programming: Learn to code with Python
- Classic Game Programming on the NES: Make your own retro video game
- Tiny CSS Projects
- Classic Computer Science Problems in Swift: Essential techniques for practicing programmers
What to know first
- canvas elementThe HTML canvas element is a scriptable bitmap drawing surface in a web document, with an API for rendering graphics.
- coordinate systemA coordinate system is a reference framework that assigns numerical coordinates to points or positions relative to defined origins, axes, or other references.
- CSSCSS (Cascading Style Sheets) is a stylesheet language for specifying the presentation and layout of structured documents.
- gridA grid is a regular arrangement of positions or cells organized by rows and columns or by fixed neighboring relationships.
Related concepts
- bar chartincludes · A bar chart is a visualization that compares quantitative values for discrete categories using rectangular bars whose lengths or heights encode magnitude.
- box plotpart of · A box plot is a statistical graphic that summarizes a numerical distribution using quartiles, a median, and whiskers or markers indicating spread and potential outliers.
- collision detectionused by · Collision detection is the computational determination of whether modeled objects or entities intersect, touch, or otherwise occupy conflicting spatial regions.
- grid areaused by · A grid area is a rectangular region of one or more CSS Grid cells, optionally identified by a name for layout placement.
- histogrampart of · A histogram is a representation that groups observations into bins and records their frequencies or other aggregate values.
- loading indicatorpart of · A loading indicator is a user-interface element that signals an ongoing operation, such as loading, initialization, or data retrieval.
Questions about Rectangle
What is Rectangle?
A rectangle is a planar quadrilateral with four right angles and opposite sides of equal length.
Which Manning books explain Rectangle?
D3.js in Action, Third Edition, Data Storytelling with Altair and AI and Advanced Algorithms and Data Structures.
What should I know before learning Rectangle?
Manning books that teach Rectangle usually introduce canvas element, coordinate system, CSS and grid first.
What kinds of Rectangle are there?
Kinds of Rectangle include bar chart.
What is Rectangle part of?
Rectangle is part of box plot. A box plot is a statistical graphic that summarizes a numerical distribution using quartiles, a median, and whiskers or markers indicating spread and potential outliers.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


