Source: https://d3js.org/api
Skip to content
Return to top
API index
==============================================
D3 is a collection of modules that are designed to work together; you can use the modules independently, or you can use them together as part of the default build.
d3-array
Array manipulation, ordering, searching, summarizing, etc.
Add floating point values with full precision.
- new Adder
- create a full precision adder.
- adder.add
- adder.valueOf
- get the double-precision representation of an adder’s value.
- fcumsum
- compute a full precision cumulative summation of numbers.
- fsum
- compute a full precision summation of an iterable of numbers.
Bin discrete samples into continuous, non-overlapping intervals.
Quickly find a value in a sorted array.
Blur quantitative values in one or two dimensions.
- d3.blur
- blur an array of numbers in place.
- d3.blur2
- blur a two-dimensional array of numbers in place.
- d3.blurImage
- blur an RGBA ImageData in place.
Group discrete values.
Create maps and sets with non-primitive values such as dates.
Logical operations on sets.
Sort and reorder arrays of values.
Compute summary statistics.
- d3.count
- count valid number values in an iterable.
- d3.min
- compute the minimum value in an iterable.
- d3.minIndex
- compute the index of the minimum value in an iterable.
- d3.max
- compute the maximum value in an iterable.
- d3.maxIndex
- compute the index of the maximum value in an iterable.
- d3.least
- returns the least element of an iterable.
- d3.leastIndex
- returns the index of the least element of an iterable.
- d3.greatest
- returns the greatest element of an iterable.
- d3.greatestIndex
- returns the index of the greatest element of an iterable.
- d3.extent
- compute the minimum and maximum value in an iterable.
- d3.mode
- compute the mode (the most common value) of an iterable of numbers.
- d3.sum
- compute the sum of an iterable of numbers.
- d3.mean
- compute the arithmetic mean of an iterable of numbers.
- d3.median
- compute the median of an iterable of numbers (the 0.5-quantile).
- d3.medianIndex
- compute the median index of an iterable of numbers (the 0.5-quantile).
- d3.cumsum
- compute the cumulative sum of an iterable.
- d3.quantile
- compute a quantile for an iterable of numbers.
- d3.quantileIndex
- compute a quantile index for an iterable of numbers.
- d3.quantileSorted
- compute a quantile for a sorted array of numbers.
- d3.rank
- compute the rank order of an iterable.
- d3.variance
- compute the variance of an iterable of numbers.
- d3.deviation
- compute the standard deviation of an iterable of numbers.
- d3.every
- test if all values satisfy a condition.
- d3.some
- test if any value satisfies a condition.
Generate representative values from a continuous interval.
- d3.ticks
- generate representative values from a numeric interval.
- d3.tickIncrement
- generate representative values from a numeric interval.
- d3.tickStep
- generate representative values from a numeric interval.
- d3.nice
- extend an interval to align with ticks.
- d3.range
- generate a range of numeric values.
Derive new arrays.
d3-axis
Human-readable reference marks for scales.
d3-brush
Select a one- or two-dimensional region using the mouse or touch.
d3-chord
d3-color
Color manipulation and color space conversion.
d3-contour
Compute contour polygons using marching squares.
d3-delaunay
Compute the Voronoi diagram of a set of two-dimensional points.
d3-dispatch
Separate concerns using named callbacks.
d3-drag
Drag and drop SVG, HTML or Canvas using mouse or touch input.
d3-dsv
Parse and format delimiter-separated values, most commonly CSV and TSV.
d3-ease
Easing functions for smooth animation.
d3-fetch
Convenience methods on top of the Fetch API.
d3-force
Force-directed graph layout using velocity Verlet integration.
d3-format
Format numbers for human consumption.
d3-geo
Geographic projections, shapes and math.
- d3.geoArea
- compute the spherical area of a given feature.
- d3.geoBounds
- compute the latitude-longitude bounding box for a given feature.
- d3.geoCentroid
- compute the spherical centroid of a given feature.
- d3.geoDistance
- compute the great-arc distance between two points.
- d3.geoLength
- compute the length of a line string or the perimeter of a polygon.
- d3.geoInterpolate
- interpolate between two points along a great arc.
- d3.geoContains
- test whether a point is inside a given feature.
- d3.geoRotation
- create a rotation function for the specified angles.
d3-hierarchy
Layout algorithms for visualizing hierarchical data.
d3-interpolate
Interpolate numbers, colors, strings, arrays, objects, whatever!
d3-path
Serialize Canvas path commands to SVG.
d3-polygon
Geometric operations for two-dimensional polygons.
d3-quadtree
Two-dimensional recursive spatial subdivision.
d3-random
Generate random numbers from various distributions.
d3-scale
Encodings that map abstract data to visual representation.
Map a continuous, quantitative domain to a continuous range.
Map a continuous, quantitative domain to a continuous, fixed interpolator.
Map a continuous, quantitative domain to a continuous, fixed interpolator.
Map a continuous, quantitative domain to a discrete range.
Map a discrete domain to a discrete range.
d3-scale-chromatic
Color ramps and palettes for quantitative, ordinal and categorical scales.
d3-selection
Transform the DOM by selecting elements and joining to data.
d3-shape
Graphical primitives for visualization.
Circular or annular sectors, as in a pie or donut chart.
Compute the necessary angles to represent a tabular dataset as a pie or donut chart.
A spline or polyline, as in a line chart.
An area, defined by a bounding topline and baseline, as in an area chart.
Interpolate between points to produce a continuous shape.
A smooth cubic Bézier curve from a source to a target.
A categorical shape encoding, as in a scatterplot.
Stack shapes, placing one adjacent to another, as in a stacked bar chart.
d3-time
A calculator for humanity’s peculiar conventions of time.
- d3.timeInterval
- implement a new custom time interval.
- interval
- alias for interval.floor.
- interval.floor
- round down to the nearest boundary.
- interval.round
- round to the nearest boundary.
- interval.ceil
- round up to the nearest boundary.
- interval.offset
- offset a date by some number of intervals.
- interval.range
- generate a range of dates at interval boundaries.
- interval.filter
- create a filtered subset of this interval.
- interval.every
- create a filtered subset of this interval.
- interval.count
- count interval boundaries between two dates.
- d3.timeMillisecond
- the millisecond interval, local time.
- d3.timeSecond
- the second interval, local time.
- d3.timeMinute
- the minute interval, local time.
- d3.timeHour
- the hour interval, local time.
- d3.timeDay
- the day interval, local time.
- d3.timeWeek
- the Sunday-based week interval, local time.
- d3.timeSunday
- the Sunday-based week interval, local time.
- d3.timeMonday
- the Monday-based week interval, local time.
- d3.timeTuesday
- the Tuesday-based week interval, local time.
- d3.timeWednesday
- the Wednesday-based week interval, local time.
- d3.timeThursday
- the Thursday-based week interval, local time.
- d3.timeFriday
- the Friday-based week interval, local time.
- d3.timeSaturday
- the Saturday-based week interval, local time.
- d3.timeMonth
- the month interval, local time.
- d3.timeYear
- the year interval, local time.
- d3.utcMillisecond
- the millisecond interval, UTC time.
- d3.utcSecond
- the second interval, UTC time.
- d3.utcMinute
- the minute interval, UTC time.
- d3.utcHour
- the hour interval, UTC time.
- d3.utcDay
- the day interval, UTC time.
- d3.utcWeek
- the Sunday-based week interval, UTC time.
- d3.utcSunday
- the Sunday-based week interval, UTC time.
- d3.utcMonday
- the Monday-based week interval, UTC time.
- d3.utcTuesday
- the Tuesday-based week interval, UTC time.
- d3.utcWednesday
- the Wednesday-based week interval, UTC time.
- d3.utcThursday
- the Thursday-based week interval, UTC time.
- d3.utcFriday
- the Friday-based week interval, UTC time.
- d3.utcSaturday
- the Saturday-based week interval, UTC time.
- d3.utcMonth
- the month interval, UTC time.
- d3.utcYear
- the year interval, UTC time.
- d3.unixDay
- the day interval, UTC time, not month-aligned.
- d3.timeMilliseconds
- alias for d3.timeMillisecond.range.
- d3.timeSeconds
- alias for d3.timeSecond.range.
- d3.timeMinutes
- alias for d3.timeMinute.range.
- d3.timeHours
- alias for d3.timeHour.range.
- d3.timeDays
- alias for d3.timeDay.range.
- d3.timeWeeks
- alias for d3.timeWeek.range.
- d3.timeSundays
- alias for d3.timeSunday.range.
- d3.timeMondays
- alias for d3.timeMonday.range.
- d3.timeTuesdays
- alias for d3.timeTuesday.range.
- d3.timeWednesdays
- alias for d3.timeWednesday.range.
- d3.timeThursdays
- alias for d3.timeThursday.range.
- d3.timeFridays
- alias for d3.timeFriday.range.
- d3.timeSaturdays
- alias for d3.timeSaturday.range.
- d3.timeMonths
- alias for d3.timeMonth.range.
- d3.timeYears
- alias for d3.timeYear.range.
- d3.utcMilliseconds
- alias for d3.utcMillisecond.range.
- d3.utcSeconds
- alias for d3.utcSecond.range.
- d3.utcMinutes
- alias for d3.utcMinute.range.
- d3.utcHours
- alias for d3.utcHour.range.
- d3.utcDays
- alias for d3.utcDay.range.
- d3.utcWeeks
- alias for d3.utcWeek.range.
- d3.utcSundays
- alias for d3.utcSunday.range.
- d3.utcMondays
- alias for d3.utcMonday.range.
- d3.utcTuesdays
- alias for d3.utcTuesday.range.
- d3.utcWednesdays
- alias for d3.utcWednesday.range.
- d3.utcThursdays
- alias for d3.utcThursday.range.
- d3.utcFridays
- alias for d3.utcFriday.range.
- d3.utcSaturdays
- alias for d3.utcSaturday.range.
- d3.utcMonths
- alias for d3.utcMonth.range.
- d3.utcYears
- alias for d3.utcYear.range.
- d3.unixDays
- alias for d3.unixDay.range.
- d3.timeTicks
- generate representative values from a time interval.
- d3.utcTicks
- generate representative values from a time interval.
- d3.timeTickInterval
- generate representative values from a time interval.
- d3.utcTickInterval
- generate representative values from a time interval.
d3-time-format
Parse and format times, inspired by strptime and strftime.
d3-timer
An efficient queue for managing thousands of concurrent animations.
d3-transition
Animated transitions for selections
.
d3-zoom
Pan and zoom SVG, HTML or Canvas using mouse or touch input.