Commit 239b7390 authored by Mike Bostock's avatar Mike Bostock
Browse files


parent 2705001d
......@@ -891,24 +891,33 @@ For the sake of parsimony, the multi-value map methods have been extracted to [d
## [Shapes (d3-shape)](
Pursuant to the great namespace flattening:
* d3.svg.line ↦ [d3.line](
* d3.svg.line.radial ↦ [d3.radialLine](
* d3.svg.area ↦ [d3.area](
* d3.svg.area.radial ↦ [d3.radialArea](
* d3.svg.arc ↦ [d3.arc](
* d3.layout.pie ↦ [d3.pie](
Shapes are no longer limited to SVG; they can now render to Canvas! Each shape generator supports an optional *context*: if you pass it a [CanvasRenderingContext2D](, you can generate a canvas path to be filled or stroked. For example, a [canvas pie chart]( might use an arc generator:
[Introducing d3-shape](
var arc = d3.arc()
.outerRadius(radius - 10)
* d3.svg.line ↦ d3.line
* d3.svg.line.radial ↦ d3.radialLine
* d3.svg.area ↦ d3.area
* d3.svg.area.radial ↦ d3.radialArea
* d3.svg.arc ↦ d3.arc
* more robust arc padding?
To render an arc for a given datum *d*:
shapes can now render to canvas!
* *line*.context
* *area*.context
* *arc*.context
* see also d3-path
* fast; uses streaming geometry transforms similar to d3-geo
See [*line*.context](, [*area*.context]( and [*arc*.context]( for more. Under the hood, this uses [d3-path](#paths-d3-path) to serialize canvas path methods to an SVG path data string when the context is null. Thus, shapes are optimized for rendering to canvas.
new curve API!
......@@ -941,6 +950,8 @@ new curve API!
* "step-before" ↦ d3.curveStepBefore
* no more funky *interpolate*.reverse; curves can define different behavior for topline vs. baseline
new derived shapes: e.g., *area*.lineY0 for the baseline, *area*.lineY1 for the topline.
new symbol API
* d3.svg.symbol ↦ d3.symbol
......@@ -956,11 +967,15 @@ new stack API!
* no more x-accessor
* no more weird *stack*.out
more robust arc padding?
removed diagonal shapes
* d3.svg.diagonal ↦ REMOVED
* d3.svg.diagonal.radial ↦ REMOVED
For more, see [Introducing d3-shape](
## [Time Formats (d3-time-format)](
Pursuant to the great namespace flattening, the format constructors have new names:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment