d4 library
D4 is an ongoing project to port the D3 JavaScript library to the Dart language.
See one of:
- d4_array - List manipulation, ordering, searching, summarizing, etc.
- d4_color - Color spaces! RGB, HSL, Cubehelix, CIELAB, and more.
- d4_dsv - A parser and formatter for delimiter-separated values, such as CSV and TSV.
- d4_format - Format numbers for human consumption.
- d4_geo - Geographic projections, spherical shapes and spherical trigonometry.
- d4_hierarchy - 2D layout algorithms for visualizing hierarchical data.
- d4_interpolate - Interpolate numbers, colors, strings, lists, maps, whatever!
- d4_path - Serialize Canvas path commands to SVG.
- d4_polygon - Geometric operations for two-dimensional polygons.
- d4_random - Generate random numbers from various distributions.
- d4_scale - Encodings that map abstract data to visual representation.
- d4_scale_chromatic - Sequential, diverging and categorical color scales.
- d4_shape - Graphical primitives for visualization, such as lines and areas.
- d4_time - A calculator for humanity’s peculiar conventions of time.
- d4_time_format - Parse and format times, inspired by strptime and strftime.
Classes
- Adder
- Creates a full precision adder for IEEE 754 floating point numbers, setting its initial value to 0.
- Arc
- The arc generator produces a circular or annular sector, as in a pie or donut chart.
-
Area<
T> - The area generator produces an area defined by a topline and a baseline as in an area chart.
-
AreaRadial<
T> - A radial area generator is like the Cartesian area generator except the Area.x and Area.y accessors are replaced with angle and radius accessors.
-
Bin<
T extends num?> - A bin generator for numerical data.
-
BinBy<
T, R extends num?> - Equivalent do Bin, except that it allows for customized data processing and flexible binning based on specific attributes of the data elements.
-
Cluster<
T> - The cluster layout produces dendrograms: node-link diagrams that place leaf nodes of the tree at the same depth.
- Color
- An abstract class representing a color in various color spaces.
- Cubehelix
- A color representation in the Cubehelix color space.
- Curve
- Curves are typically not used directly, instead being passed to Line.curve and Area.curve. However, you can define your own curve implementation should none of the built-in curves satisfy your needs using the following interface; see the curveLinear source for an example implementation.
- DsvFormat
- A class for parsing and formatting Delimiter-Separated Values (DSV) data.
- FormatLocale
- Locale formats define how a value should be formatted in a locale-specific way.
- FormatSpecifier
- Format specifiers define how a number should be formatted (see FormatLocale.format) and can be created and derived in a structured way.
- GeoAlbersUsa
- A U.S.-centric composite projection of three geoConicEqualArea projections.
- GeoCircle
- A geometry geographic generator for creating circles.
- GeoConicProjection
- Conic projections project the sphere onto a cone, and then unroll the cone onto the plane.
- GeoGraticule
- A geometry geographic generator for creating graticules.
- GeoIdentity
- The identity transform can be used to scale, translate and clip planar geometry.
- GeoPath
- A geographic path generator that takes a given GeoJSON geometry or feature object and generates SVG path data string or renders to a Canvas.
- GeoProjection
- Projections transform spherical polygonal geometry to planar polygonal geometry.
- GeoProjectionMutator
- A projection wrapper to mutate as needed.
- GeoRawProjection
- Raw projections are point transformation functions that are used to implement custom projections.
- GeoRotation
- A raw transform that represents a rotation about each spherical axis.
- GeoStream
- Rather than materializing intermediate representations, streams transform geometry through function calls to minimize overhead.
- GeoTransform
- Transforms are a generalization of projections.
- GeoTransverseMercator
- The transverse spherical Mercator projection.
- Hcl
- A color representation in the CIELChab color space.
-
HierarchyNode<
T> - A hierarchy node holds data, it can be linked to a parent if it is not a root, as well as to children if it is not a leaf.
- Hsl
- A color representation in the HSL color space.
- Lab
- A color representation in the CIELAB color space.
-
Line<
T> - The line generator produces a spline or polyline as in a line chart.
-
LineRadial<
T> - A radial line generator is like the Cartesian line generator except the Line.x and Line.y accessors are replaced with angle and radius accessors.
-
Link<
T> - The link shape generates a smooth cubic Bézier curve from a source point to a target point.
-
LinkRadial<
T> - A radial link generator is like the Cartesian link generator except the Link.x and Link.y accessors are replaced with angle and radius accessors.
-
Pack<
T> - The pack layout produces circle-packing diagrams, where the area of each leaf circle is proportional its value.
-
Partition<
T> - The partition layout produces adjacency diagrams: a space-filling variant of a node-link tree diagram.
- Path
- A path serializer that implements CanvasPathMethods.
-
Pie<
T> - The pie generator computes the necessary angles to represent a tabular dataset as a pie or donut chart; these angles can then be passed to an arc generator. (The pie generator does not produce a shape directly.)
- Rgb
- A color representation in the RGB color space.
-
Scale<
X, Y> - A generic mapper from an input domain to an output range.
-
ScaleBand<
X> - Band scales are like ordinal scales except the output range is continuous and numeric.
-
ScaleDiverging<
Y> - Diverging scales are similar to linear scales, but the input domain and output range always have exactly three elements.
-
ScaleDivergingLog<
Y> - A diverging scale with a logarithmic transform, analogous to ScaleLog.
-
ScaleDivergingPow<
Y> - A diverging scale with an exponential transform, analogous to a ScalePow.
-
ScaleDivergingSymlog<
Y> - A diverging scale with a logarithmic transform, analogous to a ScaleSymlog.
- ScaleIdentity
- Identity scales are a special case of linear scales where the domain and range are identical.
-
ScaleLinear<
Y> -
Linear scales map a continuous, quantitative input
domainto a continuous outputrangeusing a linear transformation (translate and scale). -
ScaleLog<
Y> - Logarithmic (“log”) scales are like linear scales except that a logarithmic transform is applied to the input domain value before the output range value is computed.
-
ScaleOrdinal<
X, Y> - Unlike continuous scales, ordinal scales have a discrete domain and range.
-
ScalePoint<
X> - Point scales are a variant of band scales with the bandwidth fixed to zero.
-
ScalePow<
Y> - Power (“pow”) scales are similar to linear scales, except an exponential transform is applied to the input domain value before the output range value is computed.
-
ScaleQuantile<
Y> - Quantile scales map a sampled input domain to a discrete range.
-
ScaleQuantize<
Y> - Quantize scales are similar to linear scales, except they use a discrete rather than continuous range.
- ScaleRadial
- Radial scales are a variant of linear scales where the range is internally squared so that an input value corresponds linearly to the squared output value.
-
ScaleSequential<
Y> - Sequential scales are similar to linear scales, but the input domain and output range always have exactly three elements.
-
ScaleSequentialLog<
Y> - A sequential scale with a logarithmic transform, analogous to ScaleLog.
-
ScaleSequentialPow<
Y> - A sequential scale with an exponential transform, analogous to a ScalePow.
-
ScaleSequentialQuantile<
Y> - A sequential scale with a p-quantile transform, analogous to a ScaleQuantile.
-
ScaleSequentialSymlog<
Y> - A sequential scale with a logarithmic transform, analogous to a ScaleSymlog.
-
ScaleSymlog<
Y> - See A bi-symmetric log transformation for wide-range data by Webber for details. Unlike a ScaleLog, a symlog scale domain can include zero.
-
ScaleThreshold<
X, Y> - Threshold scales are similar to quantize scales, except they allow you to map arbitrary subsets of the domain to discrete values in the range.
-
ScaleTime<
Y> - Time scales are a variant of linear scales that have a temporal domain.
-
Stack<
K, T> - Stacking converts lengths into contiguous position intervals.
-
StackTidy<
KL, KG, T> - Equivalent to Stack, except that it is designed to work with tidy data.
-
Stratify<
T> - Transforms a tree from link representation to hierarchy.
- Symbol
- Symbols provide a categorical shape encoding as in a scatterplot.
- SymbolAsterisk
- The asterisk symbol type; intended for stroking.
- SymbolCircle
- The circle symbol type; intended for either filling or stroking.
- SymbolCross
- The Greek cross symbol type, with arms of equal length; intended for filling.
- SymbolDiamond
- The rhombus symbol type; intended for filling.
- SymbolDiamond2
- The rotated square symbol type; intended for stroking.
- SymbolPlus
- The plus symbol type; intended for stroking.
- SymbolSquare
- The square symbol type; intended for filling.
- SymbolSquare2
- The square2 symbol type; intended for stroking.
- SymbolStar
- The pentagonal star (pentagram) symbol type; intended for filling.
- SymbolTimes
- The X-shape symbol type; intended for stroking.
- SymbolTriangle
- The up-pointing triangle symbol type; intended for filling.
- SymbolTriangle2
- The up-pointing triangle symbol type; intended for stroking.
- SymbolType
- Symbol types are typically not used directly, instead being passed to Symbol.type. However, you can define your own symbol type implementation should none of the built-in types satisfy your needs using the following interface.
- SymbolWye
- The Y-shape symbol type; intended for filling.
- TimeFormatLocale
- Time locale formats define how a date should be parsed and formatted in a locale-specific way.
- TimeInterval
- Time intervals provide a convenient and flexible API for date calculations based on conventional or custom units of time on top of DateTime.
-
Tree<
T> - The tree layout produces tidy node-link diagrams of trees using the Reingold–Tilford “tidy” algorithm, improved to run in linear time by Buchheim et al.
-
Treemap<
T> - A treemap recursively subdivides area into rectangles according to each node’s associated value.
Extension Types
- PackCircle
- "Wraps" any object or map, assuming it has the properties or keys x, y and r.
Extensions
-
ScaleContinuousNumberExtension
on ScaleContinuousBase<
X, num> - Adds invert and rangeRound methods to continuous scales with numeric range.
-
ScaleDivergingNumberExtension
on ScaleDiverging<
num> - Adds rangeRound method to diverging scales with numeric range.
-
ScaleSequentialNumberExtension
on ScaleSequential<
num> - Adds rangeRound method to sequential scales with numeric range.
Constants
- geoEqualEarthRaw → const GeoRawProjection Cylindrical projections Projections
- The raw Equal Earth projection, by Bojan Šavrič et al., 2018.
- geoEquirectangularRaw → const GeoRawProjection Cylindrical projections Projections
- The raw equirectangular (plate carrée) projection.
- geoMercatorRaw → const GeoRawProjection Cylindrical projections Projections
- The raw spherical Mercator projection.
- geoNaturalEarth1Raw → const GeoRawProjection Cylindrical projections Projections
- The raw Natural Earth projection.
- geoTransverseMercatorRaw → const GeoRawProjection Cylindrical projections Projections
- The raw transverse spherical Mercator projection.
-
symbols
→ const List<
SymbolType> Symbols - Equivalent to symbolsFill.
-
symbolsFill
→ const List<
SymbolType> Symbols - An list containing a set of symbol types designed for filling: SymbolCircle, SymbolCross, SymbolDiamond, SymbolSquare, SymbolStar, SymbolTriangle, and SymbolWye. Useful for a categorical shape encoding with an ordinal scale.
-
symbolsStroke
→ const List<
SymbolType> Symbols - An list containing a set of symbol types designed for stroking: SymbolCircle, SymbolPlus, SymbolTimes, SymbolTriangle2, SymbolAsterisk, SymbolSquare2, and SymbolDiamond2. Useful for a categorical shape encoding with an ordinal scale.
Properties
- geoAzimuthalEqualAreaRaw → GeoRawProjection Azimuthal projections Projections
-
The raw azimuthal equal-area projection.
final
- geoAzimuthalEquidistantRaw → GeoRawProjection Azimuthal projections Projections
-
The raw azimuthal equidistant projection.
final
- geoClipAntimeridian → GeoStream Function(GeoStream) Projections
-
A clipping function which transforms a stream such that geometries (lines or
polygons) that cross the antimeridian line are cut in two, one on each side.
final
- geoGnomonicRaw → GeoRawProjection Azimuthal projections Projections
-
The raw gnomonic projection.
final
- geoOrthographicRaw → GeoRawProjection Azimuthal projections Projections
-
The raw orthographic projection.
final
- geoStereographicRaw → GeoRawProjection Azimuthal projections Projections
-
The raw stereographic projection.
final
-
schemeAccent
→ List<
String> Categorical schemes -
An list of eight categorical colors represented as RGB hexadecimal strings.
final
-
schemeBlues
→ List<
List< Sequential schemesString> ?> -
The “Blues” discrete sequential color scheme of size k in 3–9.
final
-
schemeBrBG
→ List<
List< Diverging schemesString> ?> -
The “BrBG” discrete diverging color scheme of size k in 3–11.
final
-
schemeBuGn
→ List<
List< Sequential schemesString> ?> -
The “BuGn” discrete sequential color scheme of size k in 3–9.
final
-
schemeBuPu
→ List<
List< Sequential schemesString> ?> -
The “BuPu” discrete sequential color scheme of size k in 3–9.
final
-
schemeCategory10
→ List<
String> Categorical schemes -
An list of ten categorical colors represented as RGB hexadecimal strings.
final
-
schemeDark2
→ List<
String> Categorical schemes -
An list of eight categorical colors represented as RGB hexadecimal strings.
final
-
schemeGnBu
→ List<
List< Sequential schemesString> ?> -
The “GnBu” discrete sequential color scheme of size k in 3–9.
final
-
schemeGreens
→ List<
List< Sequential schemesString> ?> -
The “Greens” discrete sequential color scheme of size k in 3–9.
final
-
schemeGreys
→ List<
List< Sequential schemesString> ?> -
The “Greys” discrete sequential color scheme of size k in 3–9.
final
-
schemeOranges
→ List<
List< Sequential schemesString> ?> -
The “Oranges” discrete sequential color scheme of size k in 3–9.
final
-
schemeOrRd
→ List<
List< Sequential schemesString> ?> -
The “OrRd” discrete sequential color scheme of size k in 3–9.
final
-
schemePaired
→ List<
String> Categorical schemes -
An list of twelve categorical colors represented as RGB hexadecimal strings.
final
-
schemePastel1
→ List<
String> Categorical schemes -
An list of nine categorical colors represented as RGB hexadecimal strings.
final
-
schemePastel2
→ List<
String> Categorical schemes -
An list of eight categorical colors represented as RGB hexadecimal strings.
final
-
schemePiYG
→ List<
List< Diverging schemesString> ?> -
The “PiYG” discrete diverging color scheme of size k in 3–11.
final
-
schemePRGn
→ List<
List< Diverging schemesString> ?> -
The “PRGn” discrete diverging color scheme of size k in 3–11.
final
-
schemePuBu
→ List<
List< Sequential schemesString> ?> -
The “PuBu” discrete sequential color scheme of size k in 3–9.
final
-
schemePuBuGn
→ List<
List< Sequential schemesString> ?> -
The “PuBuGn” discrete sequential color scheme of size k in 3–9.
final
-
schemePuOr
→ List<
List< Diverging schemesString> ?> -
The “PuOr” discrete diverging color scheme of size k in 3–11.
final
-
schemePuRd
→ List<
List< Sequential schemesString> ?> -
The “PuRd” discrete sequential color scheme of size k in 3–9.
final
-
schemePurples
→ List<
List< Sequential schemesString> ?> -
The “Purples” discrete sequential color scheme of size k in 3–9.
final
-
schemeRdBu
→ List<
List< Diverging schemesString> ?> -
The “RdBu” discrete diverging color scheme of size k in 3–11.
final
-
schemeRdGy
→ List<
List< Diverging schemesString> ?> -
The “RdGy” discrete diverging color scheme of size k in 3–11.
final
-
schemeRdPu
→ List<
List< Sequential schemesString> ?> -
The “RdPu” discrete sequential color scheme of size k in 3–9.
final
-
schemeRdYlBu
→ List<
List< Diverging schemesString> ?> -
The “RdYlBu” discrete diverging color scheme of size k in 3–11.
final
-
schemeRdYlGn
→ List<
List< Diverging schemesString> ?> -
The “RdYlGn” discrete diverging color scheme of size k in 3–11.
final
-
schemeReds
→ List<
List< Sequential schemesString> ?> -
The “Reds” discrete sequential color scheme of size k in 3–9.
final
-
schemeSet1
→ List<
String> Categorical schemes -
An list of nine categorical colors represented as RGB hexadecimal strings.
final
-
schemeSet2
→ List<
String> Categorical schemes -
An list of eight categorical colors represented as RGB hexadecimal strings.
final
-
schemeSet3
→ List<
String> Categorical schemes -
An list of twelve categorical colors represented as RGB hexadecimal strings.
final
-
schemeSpectral
→ List<
List< Diverging schemesString> ?> -
The “Spectral” discrete diverging color scheme of size k in 3–11.
final
-
schemeTableau10
→ List<
String> Categorical schemes -
An list of ten categorical colors authored by Tableau as part of
Tableau 10
represented as RGB hexadecimal strings.
final
-
schemeYlGn
→ List<
List< Sequential schemesString> ?> -
The “YlGn” discrete sequential color scheme of size k in 3–9.
final
-
schemeYlGnBu
→ List<
List< Sequential schemesString> ?> -
The “YlGnBu” discrete sequential color scheme of size k in 3–9.
final
-
schemeYlOrBr
→ List<
List< Sequential schemesString> ?> -
The “YlOrBr” discrete sequential color scheme of size k in 3–9.
final
-
schemeYlOrRd
→ List<
List< Sequential schemesString> ?> -
The “YlOrRd” discrete sequential color scheme of size k in 3–9.
final
- timeDay → TimeInterval
-
Days (e.g., February 7, 2012 at 12:00 AM); typically 24 hours. Days in local
time may range from 23 to 25 hours due to daylight saving.
final
-
timeDays
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeDay.range.
final
- timeFriday → TimeInterval
-
Friday-based weeks (e.g., February 10, 2012 at 12:00 AM).
final
-
timeFridays
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeFridays.range.
final
- timeHour → TimeInterval
-
Hours (e.g., 01:00 AM); 60 minutes. Note that advancing time by one hour in
local time can return the same hour or skip an hour due to daylight saving.
final
-
timeHours
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeHour.range.
final
- timeMillisecond → _TimeMillisecond
-
Milliseconds; the shortest available time unit.
final
-
timeMilliseconds
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeMillisecond.range.
final
- timeMinute → TimeInterval
-
Minutes (e.g., 01:02:00 AM); 60 seconds. Note that DateTime class
ignores leap seconds.
final
-
timeMinutes
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeMinute.range.
final
- timeMonday → TimeInterval
-
Monday-based weeks (e.g., February 6, 2012 at 12:00 AM).
final
-
timeMondays
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeMondays.range.
final
- timeMonth → TimeInterval
-
Months (e.g., February 1, 2012 at 12:00 AM); ranges from 28 to 31 days.
final
-
timeMonths
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeMonth.range.
final
- timeSaturday → TimeInterval
-
Saturday-based weeks (e.g., February 11, 2012 at 12:00 AM).
final
-
timeSaturdays
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeSaturdays.range.
final
- timeSecond → TimeInterval
-
Seconds in local time (e.g., 01:23:45.0000 AM); 1,000 milliseconds.
final
-
timeSeconds
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeSecond.range.
final
- timeSunday → TimeInterval
-
Sunday-based weeks (e.g., February 5, 2012 at 12:00 AM).
final
-
timeSundays
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeSundays.range.
final
- timeThursday → TimeInterval
-
Thursday-based weeks (e.g., February 9, 2012 at 12:00 AM).
final
-
timeThursdays
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeThursdays.range.
final
- timeTuesday → TimeInterval
-
Tuesday-based weeks (e.g., February 7, 2012 at 12:00 AM).
final
-
timeTuesdays
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeTuesdays.range.
final
- timeWednesday → TimeInterval
-
Wednesday-based weeks (e.g., February 8, 2012 at 12:00 AM).
final
-
timeWednesdays
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeWednesdays.range.
final
- timeWeek → TimeInterval
-
Alias for timeSunday; 7 days and typically 168 hours. Weeks in local time
may range from 167 to 169 hours due to daylight saving.
final
-
timeWeeks
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeWeeks.range.
final
- timeYear → _TimeYear
-
Years (e.g., January 1, 2012 at 12:00 AM); ranges from 365 to 366 days.
final
-
timeYears
→ List<
DateTime> Function(DateTime start, DateTime stop, [num step = 1]) -
Alias for timeYear.range.
final
Functions
-
ascending(
Object? a, Object? b) → num -
Returns -1 if
ais less thanb, or 1 ifais greater thanb, or 0. -
autoType(
Map< String, String> row) → Map<String, Object?> - Given an map representing a parsed row, infers the types of values on the map and coerces them accordingly, returning the mutated map.
-
bisectCenter<
T> (List< T> list, T x, {int lo = 0, int? hi, num comparator(T, T) = ascending, num delta(T, T)?}) → int -
Similar to bisectLeft, but returns the index of the value closest to
xin the givenlistaccording to the specifieddeltafunction. -
bisectLeft<
T> (List< T> list, T x, {int lo = 0, int? hi, num comparator(T, T) = ascending}) → int -
Returns the insertion point for
xinlistto maintain sorted order according to the specifiedcomparator. -
bisectRight<
T> (List< T> list, T x, {int lo = 0, int? hi, num comparator(T, T) = ascending}) → int -
Similar to bisectLeft, but returns an insertion point which comes after
(to the right of) any existing entries of
xinlist. -
blur(
List< double> data, num radius) → List<double> -
Blurs an list of
datain-place by applying three iterations of a moving average transform, for a fast approximation of a gaussian kernel of the givenradius, a non-negative number, and returns the list. -
blur2(
({List< double> data, int? height, int width}) data, int rx, [int? ry]) → ({List<double> data, int? height, int width}) -
Blurs a matrix of the given width and height in-place, by applying an
horizontal blur of radius
rxand a vertical blur or radiusry(which defaults torx). -
blurImage(
({List< double> data, int? height, int width}) data, int rx, [int? ry]) → ({List<double> data, int? height, int width}) -
Blurs an ImageData
structure in-place, blurring each of the RGBA layers independently by
applying an horizontal blur of radius
rxand a vertical blur or radiusry(which defaults torx). Returns the blurred ImageData. -
count(
Iterable< num?> iterable) → int -
Returns the count of values in the
iterable. -
countBy<
T> (Iterable< T> iterable, num? accessor(T)) → int? -
Returns the count of values yielded by the
accessorfunction applied to each element in theiterable. -
cross<
T> (Iterable< Iterable< iterables) → List<T> >List< T> > -
Returns the
Cartesian product of the
specified
iterables. -
crossWith<
T, R> (Iterable< Iterable< iterables, R reducer(List<T> >T> )) → List<R> -
Returns the
Cartesian product of the
specified
iterables, applying the specifiedreducerfunction to each combination of elements. -
csvFormat(
Iterable< Map< rows, [Iterable<String, Object?> >String> ? columns]) → String - Equivalent to DsvFormat.format with a delimiter of ",".
-
csvFormatBody(
Iterable< Map< rows, [Iterable<String, Object?> >String> ? columns]) → String - Equivalent to DsvFormat.formatBody with a delimiter of ",".
-
csvFormatRow(
Iterable< Object?> row) → String - Equivalent to DsvFormat.formatRow with a delimiter of ",".
-
csvFormatRows(
Iterable< Iterable< rows) → StringObject?> > - Equivalent to DsvFormat.formatRows with a delimiter of ",".
-
csvFormatValue(
Object? value) → String - Equivalent to DsvFormat.formatValue with a delimiter of ",".
-
csvParse(
String data) → (List< Map< , {List<String, String> >String> columns}) - Equivalent to DsvFormat.parse using "," as delimiter.
-
csvParseRows(
String data) → List< List< String> > - Equivalent to DsvFormat.parseRows with a delimiter of ",".
-
csvParseRowsWith<
R> (String data, R? conversion(List< String> , int)) → List<R> - Equivalent to DsvFormat.parseRowsWith with a delimiter of ",".
-
csvParseWith<
R> (String data, R? conversion(Map< String, String> , int, List<String> )) → (List<R> , {List<String> columns}) - Equivalent to DsvFormat.parseWith with a delimiter of ",".
-
cumsum(
Iterable< num?> iterable) → List<num?> -
Returns the cumsum of all values in the
iterable. -
cumsumBy<
T> (Iterable< T> iterable, num? accessor(T)) → List<num> -
Returns the cumsum of all values yielded by the
accessorfunction applied to each element in theiterable, as a list of the same length. -
curveBasis(
Path context) → Curve - Produces a cubic basis spline using the specified control points.
-
curveBasisClosed(
Path context) → Curve - Produces a closed cubic basis spline using the specified control points.
-
curveBasisOpen(
Path context) → Curve - Produces a cubic basis spline using the specified control points.
-
curveBumpX(
Path context) → Curve - Produces a Bézier curve between each pair of points, with horizontal tangents at each point.
-
curveBumpY(
Path context) → Curve - Produces a Bézier curve between each pair of points, with vertical tangents at each point.
-
curveBundle(
Path context) → Curve - Produces a straightened cubic basis spline using the specified control points, with the spline straightened according to the curve’s beta (see curveBundleBeta), which defaults to 0.85.
-
curveBundleBeta(
num beta) → CurveFactory -
Returns a bundle curve with the specified
betain the range [0, 1], representing the bundle strength. -
curveCardinal(
Path context) → Curve - Produces a cubic cardinal spline using the specified control points, with one-sided differences used for the first and last piece.
-
curveCardinalClosed(
Path context) → Curve - Produces a closed cubic cardinal spline using the specified control points. When a line segment ends, the first three control points are repeated, producing a closed loop.
-
curveCardinalClosedTension(
num tension) → CurveFactory - Equivalent to curveCardinalTension, but returns a curveCardinalClosed.
-
curveCardinalOpen(
Path context) → Curve - Produces a cubic cardinal spline using the specified control points.
-
curveCardinalOpenTension(
num tension) → CurveFactory - Equivalent to curveCardinalTension, but returns a curveCardinalOpen.
-
curveCardinalTension(
num tension) → CurveCardinal Function(Path) -
Returns a cardinal curve with the specified
tensionin the range [0, 1]. -
curveCatmullRom(
Path context) → Curve - Produces a cubic Catmull–Rom spline using the specified control points and the parameter alpha (see curveCatmullRomAlpha), which defaults to 0.5, as proposed by Yuksel et al. in On the Parameterization of Catmull–Rom Curves, with one-sided differences used for the first and last piece.
-
curveCatmullRomAlpha(
num alpha) → CurveFactory -
Returns a cubic Catmull–Rom curve with the specified
alphain the range [0, 1]. -
curveCatmullRomClosed(
Path context) → Curve - Produces a closed cubic Catmull–Rom spline using the specified control points and the parameter alpha (see curveCatmullRomClosedAlpha), which defaults to 0.5, as proposed by Yuksel et al.
-
curveCatmullRomClosedAlpha(
num alpha) → CurveFactory - Equivalent to curveCatmullRomAlpha, but returns a curveCatmullRomClosed.
-
curveCatmullRomOpen(
Path context) → Curve - Produces a cubic Catmull–Rom spline using the specified control points and the parameter alpha (see curveCatmullRomClosedAlpha), which defaults to 0.5, as proposed by Yuksel et al.
-
curveCatmullRomOpenAlpha(
num alpha) → CurveFactory - Equivalent to curveCatmullRomAlpha, but returns a curveCatmullRomOpen.
-
curveLinear(
Path context) → Curve - Produces a polyline through the specified points.
-
curveLinearClosed(
Path context) → Curve - Produces a closed polyline through the specified points by repeating the first point when the line segment ends.
-
curveMonotoneX(
Path context) → Curve - Produces a cubic spline that preserves monotonicity in y, assuming monotonicity in x, as proposed by Steffen in A simple method for monotonic interpolation in one dimension: “a smooth curve with continuous first-order derivatives that passes through any given set of data points without spurious oscillations.
-
curveMonotoneY(
Path context) → Curve - Produces a cubic spline that preserves monotonicity in x, assuming monotonicity in y, as proposed by Steffen in A simple method for monotonic interpolation in one dimension: “a smooth curve with continuous first-order derivatives that passes through any given set of data points without spurious oscillations.
-
curveNatural(
Path context) → Curve - Produces a natural cubic spline with the second derivative of the spline set to zero at the endpoints.
-
curveStep(
Path context) → Curve - Produces a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines.
-
curveStepAfter(
Path context) → Curve - Produces a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines.
-
curveStepBefore(
Path context) → Curve - Produces a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines.
-
descending(
Object? a, Object? b) → num - Returns -1 if a is greater than b, or 1 if a is less than b, or 0.
-
deviation(
Iterable< num?> iterable) → num? -
Returns the standard deviation, defined as the square root of the
bias-corrected variance, of all values in the
iterable. -
deviationBy<
T> (Iterable< T> iterable, num? accessor(T)) → num? -
Returns the standard deviation, defined as the square root of the
bias-corrected variance, of all values yielded by the
accessorfunction applied to each element in theiterable. -
difference<
T> (Iterable< T> iterable, Iterable<Iterable< others) → Set<Object?> >T> -
Returns a new set containing every value in
iterablethat is not in any of theothersiterables. -
disjoint<
T> (Iterable< Object?> a, Iterable<Object?> b) → bool -
Returns true if
aandbare disjoint: ifaandbcontain no shared value. -
extent<
T extends Comparable?> (Iterable< T> iterable) → (T?, T?) -
Returns the minimum and maximum values in the
iterable. -
extentBy<
T, R extends Comparable?> (Iterable< T> iterable, R accessor(T)) → (R?, R?) -
Returns the minimum and maximum values yielded by the
accessorfunction applied to each element in theiterable. -
fcumsum(
Iterable< num?> iterable) → Float64List -
Returns a full precision cumulative sum of all values in the
iterable. -
fcumsumBy<
T> (Iterable< T> iterable, num? accessor(T)) → Float64List -
Returns a full precision cumulative sum of all values yielded by the
accessorfunction applied to each element in theiterable. -
filter<
T> (Iterable< T> iterable, bool test(T)) → List<T> -
Returns a new list containing the values from
iterable, in order, for which the given test function returns true. -
format(
String specifier) → String Function(Object?) - An alias for FormatLocale.format on the default locale (see formatDefaultLocale).
-
formatDefaultLocale(
{String? decimal, String? thousands, List< int> ? grouping, List<String> ? currency, List<String> ? numerals, String? percent, String? minus, String? nan}) → FormatLocale - Equivalent to FormatLocale.new, except it also redefines format and formatPrefix to the new locale’s FormatLocale.format and FormatLocale.formatPrefix.
-
formatDefaultLocaleFromJson(
Map< String, dynamic> definition) → FormatLocale -
Equivalent to formatDefaultLocale, but it accepts a JSON
definitionobject instead of individual arguments. -
formatPrefix(
String specifier, num value) → String Function(num) - An alias for FormatLocale.formatPrefix on the default locale (see formatDefaultLocale).
-
fsum(
Iterable< num?> iterable) → double -
Returns a full precision summation of all values in the
iterable. -
fsumBy<
T> (Iterable< T> iterable, num? accessor(T)) → double -
Returns a full precision summation of all values yielded by the
accessorfunction applied to each element in theiterable. -
geoAlbers(
) → GeoProjection - The Albers’ equal area-conic projection.
-
geoArea(
Map object) → double - Returns the spherical area of the specified GeoJSON object in steradians.
-
geoAzimuthalEqualArea(
) → GeoProjection - The azimuthal equal-area projection.
-
geoAzimuthalEquidistant(
) → GeoProjection - The azimuthal equidistant projection.
-
geoBounds(
Map object) → List< List< num> > -
Returns the
spherical bounding box for the
specified GeoJSON
object. -
geoCentroid(
Map object) → List< double> -
Returns the spherical centroid of the specified GeoJSON
object. -
geoClipCircle(
double angle) → GeoStream Function(GeoStream) -
Generates a clipping function which transforms a stream such that geometries
are bounded by a small circle of radius
anglearound the GeoProjection.center. -
geoClipRectangle(
num x0, num y0, num x1, num y1) → GeoStream Function(GeoStream) -
Generates a clipping function which transforms a stream such that geometries
are bounded by a rectangle of coordinates [[
x0,y0], [x1,y1]]. -
geoConicConformal(
) → GeoConicProjection - The conic conformal projection.
-
geoConicConformalRaw(
[List? y]) → GeoRawProjection - The raw conic conformal projection.
-
geoConicEqualArea(
) → GeoConicProjection - The Albers’ equal-area conic projection.
-
geoConicEqualAreaRaw(
[List? y]) → GeoRawProjection - The raw Albers’ equal-area conic projection.
-
geoConicEquidistant(
) → GeoConicProjection - The conic equidistant projection.
-
geoConicEquidistantRaw(
[List? y]) → GeoRawProjection - The raw conic equidistant projection.
-
geoContains(
Map? object, List< num> point) → bool -
Returns true if and only if the specified GeoJSON
objectcontains the specifiedpoint, or false if theobjectdoes not contain thepoint. -
geoDistance(
List< num> a, List<num> b) → double -
Returns the great-arc distance in
radians between the two points
aandb. -
geoEqualEarth(
) → GeoProjection - The Equal Earth projection, by Bojan Šavrič et al., 2018.
-
geoEquirectangular(
) → GeoProjection - The equirectangular (plate carrée) projection.
-
geoGnomonic(
) → GeoProjection - The gnomonic projection.
-
geoGraticule10(
) → Map - A convenience method for directly generating the default 10° global graticule as a GeoJSON MultiLineString geometry object.
-
geoInterpolate(
List< double> a, List<double> b) → List<double> Function(double) -
Returns an interpolator function given two points
aandb. -
geoLength(
Map object) → double - Returns the great-arc length of the specified GeoJSON object in radians.
-
geoMercator(
) → GeoProjection - The spherical Mercator projection.
-
geoNaturalEarth1(
) → GeoProjection - The Natural Earth projection is a pseudocylindrical projection designed by Tom Patterson.
-
geoOrthographic(
) → GeoProjection - The orthographic projection.
-
geoParseObject(
Object object) → Map< String?, dynamic> -
Returns a deep copy of the GeoJSON
objectwith the most precise types for the structure by traversing and rebuilding on the way back. -
geoParseString(
String object) → Map< String?, dynamic> -
Equivalent to geoParseObject except it accepts the GeoJSON
objectas string. -
geoParseUtf8(
Uint8List object) → Map< String?, dynamic> -
Equivalent to geoParseObject except it accepts the GeoJSON
objectas utf8. -
geoStereographic(
) → GeoProjection - The stereographic projection.
-
greatest<
T> (Iterable< T> iterable, [num comparator(T, T) = ascending]) → T? -
Returns the greatest of all values in the
iterableaccording to the specifiedcomparator. -
greatestBy<
T, R> (Iterable< T> iterable, R accessor(T), [num comparator(R, R) = ascending]) → T? -
Returns the element with the greatest of all values yielded by the
accessorfunction applied to each element in theiterableaccording to the specifiedcomparator. -
greatestIndex<
T> (Iterable< T> iterable, [num comparator(T, T) = ascending]) → int -
Returns the index of the greatest of all values in the
iterableaccording to the specifiedcomparator. -
greatestIndexBy<
T, R> (Iterable< T> iterable, R accessor(T), [num comparator(R, R) = ascending]) → int -
Returns the index of the element with the greatest of all values yielded by
the
accessorfunction applied to each element in theiterableaccording to the specifiedcomparator. -
group<
T, K> (Iterable< T> iterable, K key(T)) → Map<K, List< T> > -
Groups the specified
iterableof values into an Map fromkeyto list of value. -
groupSort<
T, K> (Iterable< T> iterable, K key(T), [num valueComparator(List<T> , List<T> ) = ascending, num keyComparator(K, K) = ascending]) → List<K> -
Groups the specified
iterableof elements according to the specifiedkeyfunction, sorts the groups according to the specifiedvalueComparatorfor values andkeyComparatorfor keys, and then returns a list of keys in sorted order. -
hierarchy<
T> (T data, Iterable< T> ? children(T)) → HierarchyNode<T> -
Equivalent to hierarchyWithDefaults, but requires
dataandchildren. -
hierarchyWithDefaults(
dynamic data, [Iterable? children(dynamic)?]) → HierarchyNode -
Constructs a root node from the specified hierarchical
data. -
index<
T, K> (Iterable< T> iterable, K key(T)) → Map<K, List< T> > - Equivalent to group but returns a unique value per compound key instead of an list, throwing if the key is not unique.
-
interpolate(
Object? a, Object? b) → Object? Function(num) -
Returns an interpolator between the two arbitrary values
aandb. -
interpolateBasis(
List< num> values) → num Function(num) -
Returns a uniform nonrational B-spline interpolator through the specified
list of
values, which must be numbers. -
interpolateBasisClosed(
List< num> values) → num Function(num) -
Returns a uniform nonrational B-spline interpolator through the specified
list of
values, which must be numbers. -
interpolateBlues(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “Blues” sequential color scheme represented as an RGB string. -
interpolateBrBG(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “BrBG” diverging color scheme represented as an RGB string. -
interpolateBuGn(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “BuGn” sequential color scheme represented as an RGB string. -
interpolateBuPu(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “BuPu” sequential color scheme represented as an RGB string. -
interpolateCividis(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “cividis” color vision deficiency-optimized color scheme designed by Nuñez, Anderton, and Renslow, represented as an RGB string. -
interpolateCool(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from Niccoli’s perceptual rainbow, represented as an RGB string. -
interpolateCubehelix(
Object? a, Object? b) → String Function(num) -
Returns an Cubehelix color space interpolator between the two colors
aandbwith a default gamma of 1. -
interpolateCubehelixDefault(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from Green’s default Cubehelix represented as an RGB string. -
interpolateCubehelixGamma(
num gamma) → String Function(num) Function(Object?, Object?) -
Returns a new Cubehelix color space interpolator factory using the specified
gamma. -
interpolateCubehelixGammaLong(
num gamma) → String Function(num) Function(Object?, Object?) - Like interpolateCubehelixGamma, but does not use the shortest path between hues.
-
interpolateCubehelixLong(
Object? a, Object? b) → String Function(num) - Like interpolateCubehelixGammaLong, but does not use the shortest path between hues.
-
interpolateDate(
DateTime a, DateTime b) → DateTime Function(num) -
Returns an interpolator between the two dates
aandb. -
interpolateDiscrete(
List< Object?> values) → Object? Function(num) -
Returns a discrete interpolator for the given list of
values. -
interpolateGnBu(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “GnBu” sequential color scheme represented as an RGB string. -
interpolateGreens(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the "Greens" sequential color scheme represented as an RGB string. -
interpolateGreys(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the "Greys" sequential color scheme represented as an RGB string. -
interpolateHcl(
Object? a, Object? b) → String Function(num) -
Returns a
CIELChab color space
interpolator between the two colors
aandb. -
interpolateHclLong(
Object? a, Object? b) → String Function(num) - Like interpolateHcl, but does not use the shortest path between hues.
-
interpolateHsl(
Object? a, Object? b) → String Function(num) -
Returns an HSL color space interpolator between the two colors
aandb. -
interpolateHslLong(
Object? a, Object? b) → String Function(num) - Like interpolateHsl, but does not use the shortest path between hues.
-
interpolateHue(
num a, num b) → num Function(num) -
Returns an interpolator between the two hue angles
aandb. -
interpolateInferno(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “inferno” perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, represented as an RGB string. -
interpolateLab(
Object? a, Object? b) → String Function(num) -
Returns a
CIELAB color space
interpolator between the two colors
aandb. -
interpolateList<
T> (List< T> a, List<T> b) → List<Object?> Function(num) -
Returns an interpolator between the two lists
aandb. -
interpolateMagma(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “magma” perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, represented as an RGB string. -
interpolateMap<
K, V> (Map< K, V> a, Map<K, V> b) → Map<K, Object?> Function(num) -
Returns an interpolator between the two objects
aandb. -
interpolateNumber(
num a, num b) → num Function(num) -
Returns an interpolator between the two numbers
aandb. -
interpolateNumberList<
T extends num> (List< T> a, List<T> b) → List<T> Function(num) -
Returns an interpolator between the two list of numbers
aandb. -
interpolateOranges(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the "Oranges" sequential color scheme represented as an RGB string. -
interpolateOrRd(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “OrRd” sequential color scheme represented as an RGB string. -
interpolatePiYG(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “PiYG” diverging color scheme represented as an RGB string. -
interpolatePlasma(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “plasma” perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, represented as an RGB string. -
interpolatePRGn(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “PRGn” diverging color scheme represented as an RGB string. -
interpolatePuBu(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “PuBu” sequential color scheme represented as an RGB string. -
interpolatePuBuGn(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “PuBuGn” sequential color scheme represented as an RGB string. -
interpolatePuOr(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “PuOr” diverging color scheme represented as an RGB string. -
interpolatePuRd(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “PuRd” sequential color scheme represented as an RGB string. -
interpolatePurples(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the "Purples" sequential color scheme represented as an RGB string. -
interpolateRainbow(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from interpolateWarm scale from [0.0, 0.5] followed by the interpolateCool scale from [0.5, 1.0], thus implementing the cyclical less-angry rainbow color scheme. -
interpolateRdBu(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “RdBu” diverging color scheme represented as an RGB string. -
interpolateRdGy(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “RdGy” diverging color scheme represented as an RGB string. -
interpolateRdPu(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “RdPu” sequential color scheme represented as an RGB string. -
interpolateRdYlBu(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “RdYlBu” diverging color scheme represented as an RGB string. -
interpolateRdYlGn(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “RdYlGn” diverging color scheme represented as an RGB string. -
interpolateReds(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the "Reds" sequential color scheme represented as an RGB string. -
interpolateRgb(
Object? a, Object? b) → String Function(num) -
Returns an RGB color space interpolator between the two colors
aandbwith a default gamma of 1. -
interpolateRgbBasis(
List< Object?> colors) → String Function(num) -
Returns a uniform nonrational B-spline interpolator through the specified
list of
colors, which are converted to RGB color space. -
interpolateRgbBasisClosed(
List< Object?> colors) → String Function(num) -
Returns a uniform nonrational B-spline interpolator through the specified
list of
colors, which are converted to RGB color space. -
interpolateRgbGamma(
num y) → String Function(num) Function(Object?, Object?) -
Returns a new RGB color space interpolator factory using the specified
gamma. -
interpolateRound(
num a, num b) → int Function(num) -
Returns an interpolator between the two numbers
aandb; the interpolator is similar to interpolateNumber, except it will round the resulting value to the nearest integer. -
interpolateSinebow(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “sinebow” color scheme by Jim Bumgardner and Charlie Loyd. -
interpolateSpectral(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “Spectral” diverging color scheme represented as an RGB string. -
interpolateString(
String a, String b) → String Function(num) -
Returns an interpolator between the two strings
aandb. -
interpolateTurbo(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “turbo” color scheme by Anton Mikhailov. -
interpolateViridis(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “viridis” perceptually-uniform color scheme designed by van der Walt, Smith and Firing for matplotlib, represented as an RGB string. -
interpolateWarm(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from a 180° rotation of Niccoli’s perceptual rainbow, represented as an RGB string. -
interpolateYlGn(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “YlGn” sequential color scheme represented as an RGB string. -
interpolateYlGnBu(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “YlGnBu” sequential color scheme represented as an RGB string. -
interpolateYlOrBr(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “YlOrBr” sequential color scheme represented as an RGB string. -
interpolateYlOrRd(
num t) → String -
Given a number
tin the range [0,1], returns the corresponding color from the “YlOrRd” sequential color scheme represented as an RGB string. -
interpolateZoom(
View a, View b) → ZoomInterpolator -
Returns an interpolator between the two views
aandbof a two-dimensional plane, based on “Smooth and efficient zooming and panning” by Jarke J. van Wijk and Wim A.A. Nuij. -
interpolateZoomRho(
num rho) → ZoomInterpolator Function(View, View) -
Returns a new zoom interpolator using the specified curvature
rho. -
intersection<
T> (Iterable< T> iterable, Iterable<Iterable< others) → Set<Object?> >T> - Returns a new set containing every (distinct) value that appears in all of the given iterables.
-
least<
T> (Iterable< T> iterable, [num comparator(T, T) = ascending]) → T? -
Returns the least of all values in the
iterableaccording to the specifiedcomparator. -
leastBy<
T, R> (Iterable< T> iterable, R accessor(T), [num comparator(R, R) = ascending]) → T? -
Returns the element with the least of all values yielded by the
accessorfunction applied to each element in theiterableaccording to the specifiedcomparator. -
leastIndex<
T> (Iterable< T> iterable, [num comparator(T, T) = ascending]) → int -
Returns the index of the least of all values in the
iterableaccording to the specifiedcomparator. -
leastIndexBy<
T, R> (Iterable< T> iterable, R accessor(T), [num comparator(R, R) = ascending]) → int -
Returns the index of the element with the least of all values yielded by
the
accessorfunction applied to each element in theiterableaccording to the specifiedcomparator. -
map<
T, R> (Iterable< T> iterable, R mapper(T)) → List<R> -
Returns a new list containing the mapped values from
iterable, in order, as defined by givenmapperfunction. -
max<
T extends Comparable?> (Iterable< T> iterable) → T? -
Returns the maximum of all values in the
iterable. -
maxBy<
T, R extends Comparable?> (Iterable< T> iterable, R accessor(T)) → R? -
Returns the maximum of all values yielded by the
accessorfunction applied to each element in theiterable. -
maxIndex<
T extends Comparable?> (Iterable< T> iterable) → int -
Returns the index of the maximum of all values in the
iterable. -
maxIndexBy<
T, R extends Comparable?> (Iterable< T> iterable, R accessor(T)) → int -
Returns the index of the maximum of all values yielded by the
accessorfunction applied to each element in theiterable. -
mean(
Iterable< num?> iterable) → num? -
Returns the mean of all values in the
iterable. -
meanBy<
T> (Iterable< T> iterable, num? accessor(T)) → num? -
Returns the mean of all values yielded by the
accessorfunction applied to each element in theiterable. -
median(
Iterable< num?> iterable) → num? -
Returns the median of all values in the
iterableusing the R-7 method. -
medianBy<
T> (Iterable< T> iterable, num? accessor(T)) → num? -
Returns the median of all values yielded by the
accessorfunction applied to each element in theiterableusing the R-7 method. -
medianIndex(
Iterable< num?> values) → int? - Similar to median, but returns the index of the value to the left of the median.
-
medianIndexBy<
T> (Iterable< T> values, num? accessor(T)) → int? - Similar to medianBy, but returns the index of the element that yields the value to the left of the median.
-
merge<
T> (Iterable< Iterable< iterables) → List<T> >T> -
Merges the specified iterable of
iterablesinto a single list. -
min<
T extends Comparable?> (Iterable< T> iterable) → T? -
Returns the minimum of all values in the
iterable. -
minBy<
T, R extends Comparable?> (Iterable< T> iterable, R accessor(T)) → R? -
Returns the minimum of all values yielded by the
accessorfunction applied to each element in theiterable. -
minIndex<
T extends Comparable?> (Iterable< T> iterable) → int -
Returns the index of the minimum of all values in the
iterable. -
minIndexBy<
T, R extends Comparable?> (Iterable< T> iterable, R accessor(T)) → int -
Returns the index of the minimum of all values yielded by the
accessorfunction applied to each element in theiterable. -
mode<
T> (Iterable< T> iterable) → T? -
Returns the mode of all values in the
iterable, i.e., the value which appears the most often. -
modeBy<
T, R> (Iterable< T> iterable, R accessor(T)) → R? -
Returns the mode of all values yielded by the
accessorfunction applied to each element in theiterable, i.e., the value which appears the most often. -
nice(
num start, num stop, num count) → (num, num) -
Returns a new interval [niceStart, niceStop] covering the given
interval [
start,stop] and where niceStart and niceStop are guaranteed to align with the corresponding tickStep. -
packEnclose<
T> (Iterable< PackCircle> circles) → PackCircle -
Computes the
smallest circle
that encloses the specified iterable of
circles, each of which must have a circle.r property specifying the circle’s radius, and circle.x and circle.y properties specifying the circle’s center. -
packSiblings(
Iterable< PackCircle> circles) → Iterable<PackCircle> -
Packs the specified iterable of
circles, each of which must have a circle.r property specifying the circle’s radius. -
pairs<
T> (Iterable< T> iterable) → List<(T, T)> -
Returns a list of pairs from consecutive values of the provided
iterable. -
pairsWith<
T, R> (Iterable< T> iterable, R reducer(T, T)) → List<R> -
Returns a list of values yielded by the
reducerfunction applied to each pair of consecutive elements from the providediterable. -
permute<
T> (Iterable< T> iterable, Iterable<int> keys) → List<T?> -
Returns a permutation of the specified
iterableusing thekeys. -
permuteMap<
K, V> (Map< K, V> map, Iterable<K> keys) → List<V?> -
Returns a permutation of the specified
mapusing thekeys. -
piecewise<
T> (List< T> values, [Object? Function(num) interpolatorFactory(T, T) = interpolate]) → Object? Function(num) -
Returns a piecewise interpolator, composing interpolators for each adjacent
pair of
values. -
pointRadial(
num angle, num radius) → List< num> -
Returns the point [x, y] for the given
anglein radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise, and the givenradius. -
polygonArea(
List< List< polygon) → numnum> > -
Returns the signed area of the specified
polygon. -
polygonCentroid(
List< List< polygon) → List<num> >num> -
Returns the centroid of the
specified
polygon. -
polygonContains(
List< List< polygon, List<num> >num> point) → bool -
Returns true if and only if the specified
pointis inside the specifiedpolygon. -
polygonHull(
List< List< points) → List<num> >List< ?num> > -
Returns the convex hull of the
specified
pointsusing Andrew’s monotone chain algorithm. -
polygonLength(
List< List< polygon) → numnum> > -
Returns the length of the perimeter of the specified
polygon. -
precisionFixed(
num step) → num -
Returns a suggested decimal precision for fixed point notation given the
specified numeric
stepvalue. -
precisionPrefix(
num step, num value) → num -
Returns a suggested decimal precision for use with
FormatLocale.formatPrefix given the specified numeric step and reference
value. -
precisionRound(
num step, num max) → num -
Returns a suggested decimal precision for format types that round to
significant digits given the specified numeric
stepandmaxvalues. -
quantile(
Iterable< num?> iterable, num p) → num? -
Returns the
p-quantile of all values in theiterable, wherepis a number in the range [0, 1]. -
quantileBy<
T> (Iterable< T> iterable, num p, num? accessor(T)) → num? -
Returns the
p-quantile of all values yielded by theaccessorfunction applied to each element in theiterable, wherepis a number in the range [0, 1]. -
quantileIndex(
Iterable< num?> iterable, num p) → int? -
Similar to quantile, but returns the index to the left of
p. -
quantileIndexBy<
T> (Iterable< T> values, num p, num? accessor(T)) → int? -
Similar to quantileBy, but returns the index to the left of
p. -
quantileSorted(
Iterable< num?> values, num p) → num? - Similar to quantile, but expects the input to be sorted.
-
quantileSortedBy<
T> (Iterable< T> values, num p, num? accessor(T)) → num? -
Similar to quantileBy, but expects the input to be sorted. In contrast
with quantileBy, the
accessoris only called on the elements needed to compute the quantile. -
quantize<
T> (T interpolator(num), int n) → List< T> -
Returns
nuniformly-spaced samples from the specifiedinterpolator, wherenis an integer greater than one. -
quickselect<
T extends List< (E> , E>T elements, num k, {num left = 0, num right = double.infinity, int compare(E, E) = ascendingDefined}) → T - See mourner/quickselect.
-
randomBates(
num n) → num Function() -
Returns a function for generating random numbers with a
Bates distribution with
nindependent variables. -
randomBatesSource(
num source()) → num Function() Function(num) -
Returns a randomBates function but where the given random number generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomBernoulli(
num p) → int Function() -
Returns a function for generating either 1 or 0 according to a
Bernoulli distribution
with 1 being returned with success probability
pand 0 with failure probability q = 1 -p. -
randomBernoulliSource(
num source()) → int Function() Function(num) -
Returns a randomBernoulli function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomBeta(
num alpha, num beta) → num Function() -
Returns a function for generating random numbers with a
beta distribution with
alphaandbetashape parameters, which must both be positive. -
randomBetaSource(
num source()) → num Function() Function(num, num) -
Returns a randomBeta function but where the given random number generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomBinomial(
num n, num p) → num Function() -
Returns a function for generating random numbers with a
binomial distribution
with
nthe number of trials andpthe probability of success in each trial. -
randomBinomialSource(
num source()) → num Function() Function(num, num) -
Returns a randomBinomial function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomCauchy(
[num a = 0, num b = 1]) → num Function() - Returns a function for generating random numbers with a Cauchy distribution.
-
randomCauchySource(
num source()) → num Function() Function([num, num]) -
Returns a randomCauchy function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomExponential(
num lambda) → num Function() -
Returns a function for generating random numbers with an
exponential distribution
with the rate
lambda; equivalent to time between events in a Poisson process with a mean of 1 /lambda. -
randomExponentialSource(
num source()) → num Function() Function(num) -
Returns a randomExponential function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomGamma(
num k, [num theta = 1]) → num Function() -
Returns a function for generating random numbers with a
gamma distribution with
kthe shape parameter andthetathe scale parameter. -
randomGammaSource(
num source()) → num Function() Function(num, [num]) -
Returns a randomGamma function but where the given random number generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomGeometric(
num p) → num Function() -
Returns a function for generating numbers with a
geometric distribution
with success probability
p. -
randomGeometricSource(
num source()) → num Function() Function(num) -
Returns a randomGeometric function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomInt(
{num min = 0, required num max}) → int Function() - Returns a function for generating random integers with a uniform distribution.
-
randomIntSource(
num source()) → int Function() Function({required num max, num min}) -
Returns a randomInt function but where the given random number generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomIrwinHall(
num n) → num Function() -
Returns a function for generating random numbers with an
Irwin–Hall distribution
with
nindependent variables. -
randomIrwinHallSource(
num source()) → num Function() Function(num) -
Returns a randomIrwinHall function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomLcg(
[num? seed]) → num Function() - Returns a linear congruential generator; this function can be called repeatedly to obtain pseudorandom values well-distributed on the interval [0,1) and with a long period (up to 1 billion numbers), similar to Random.nextDouble.
-
randomLogistic(
[num a = 0, num b = 1]) → num Function() - Returns a function for generating random numbers with a logistic distribution.
-
randomLogisticSource(
num source()) → num Function() Function([num, num]) -
Returns a randomLogistic function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomLogNormal(
[num mu = 0, num sigma = 1]) → num Function() - Returns a function for generating random numbers with a log-normal distribution.
-
randomLogNormalSource(
num source()) → num Function() Function([num, num]) -
Returns a randomLogNormal function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomNormal(
[num mu = 0, num sigma = 1]) → num Function() - Returns a function for generating random numbers with a normal (Gaussian) distribution.
-
randomNormalSource(
num source()) → num Function() Function([num, num]) -
Returns a randomNormal function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomPareto(
num alpha) → num Function() -
Returns a function for generating random numbers with a
Pareto distribution
with the shape
alpha. -
randomParetoSource(
num source()) → num Function() Function(num) -
Returns a randomPareto function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomPoisson(
num lambda) → num Function() -
Returns a function for generating random numbers with a
Poisson distribution
with mean
lambda. -
randomPoissonSource(
num source()) → num Function() Function(num) -
Returns a randomPoisson function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomUniform(
{num min = 0, num max = 1}) → num Function() - Returns a function for generating random numbers with a uniform distribution.
-
randomUniformSource(
num source()) → num Function() Function({num max, num min}) -
Returns a randomUniform function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
randomWeibull(
num k, [num a = 0, num b = 1]) → num Function() -
Returns a function for generating random numbers with one of the
generalized extreme value distributions,
depending on
k: -
randomWeibullSource(
num source()) → num Function() Function(num, [num, num]) -
Returns a randomWeibull function but where the given random number
generator
sourceis used as the source of randomness instead of Random.nextDouble. -
range(
{num start = 0, required num stop, num step = 1}) → List< num> - Returns an list containing an arithmetic progression, similar to the Python built-in range.
-
rank<
T> (Iterable< T> iterable, [num comparator(T, T) = ascending]) → List<num> -
Returns an list with the rank of each value in the
iterable, i.e., the zero-based index of the value when the iterable is sorted. -
rankBy<
T, R> (Iterable< T> iterable, R accessor(T), [num comparator(R, R) = ascending]) → List<num> -
Returns an list with the rank of each element in the
iterable, i.e., the zero-based index of the element when the iterable is sorted based on the values yielded by theaccessorfunction. -
reverse<
T> (Iterable< T> iterable) → List<T> -
Returns an list containing the values in the given
iterablein reverse order. -
rollup<
T, R, K> (Iterable< T> iterable, R reduce(List<T> ), K key(T)) → Map<K, R> -
Groups and reduces the specified
iterableof values into an Map from key to value. -
rollupSort<
T, R, K> (Iterable< T> iterable, R reduce(List<T> ), K key(T), [num valueComparator(R, R) = ascending, num keyComparator(K, K) = ascending]) → List<K> -
Groups and reduces the specified
iterableof elements according to the specifiedkeyfunction, sorts the reduced groups according to the specifiedvalueComparatorfor values andkeyComparatorfor keys, and then returns a list of keys in sorted order. -
shuffle<
T> (List< T> list, [int start = 0, int? stop]) → List<T> -
Randomizes the order of the specified
listin-place using the Fisher–Yates shuffle and returns thelist. -
shuffler<
T> (num random()) → List< T> Function(List<T> , [int, int?]) -
Returns a shuffle function given the specified
randomsource. For example, using randomLcg: -
sort<
T> (Iterable< T> iterable, [num comparator(T, T) = ascending]) → List<T> -
Returns an list containing the values in the given
iterablein the sorted order defined by the givencomparator. -
sortBy<
T, R> (Iterable< T> iterable, R accessor(T), [num comparator(R, R) = ascending]) → List<T> -
Returns a list containing the elements of the given
iterablein the sorted order defined by the values yielded by the givenaccessorfunction. -
stackOffsetDiverging(
List< List< series, List<List< >num> >int> order) → void - Positive values are stacked above zero, negative values are stacked below zero, and zero values are stacked at zero.
-
stackOffsetExpand(
List< List< series, List<List< >num> >int> order) → void - Applies a zero baseline and normalizes the values for each point such that the topline is always one.
-
stackOffsetNone(
List< List< series, List<List< >num> >int> order) → void - Applies a zero baseline.
-
stackOffsetSilhouette(
List< List< series, List<List< >num> >int> order) → void - Shifts the baseline down such that the center of the streamgraph is always at zero.
-
stackOffsetWiggle(
List< List< series, List<List< >num> >int> order) → void - Shifts the baseline so as to minimize the weighted wiggle of layers.
-
stackOrderAppearance(
List< List< series) → List<List< >num> >int> - Returns a series order such that the earliest series (according to the maximum value) is at the bottom.
-
stackOrderAscending(
List< List< series) → List<List< >num> >int> - Returns a series order such that the smallest series (according to the sum of values) is at the bottom.
-
stackOrderDescending(
List< List< series) → List<List< >num> >int> - Returns a series order such that the largest series (according to the sum of values) is at the bottom.
-
stackOrderInsideOut(
List< List< series) → List<List< >num> >int> - Returns a series order such that the earliest series (according to the maximum value) are on the inside and the later series are on the outside.
-
stackOrderNone(
List< List< series) → List<List< >num> >int> -
Returns the given series order [0, 1, … n - 1] where n is the number
of elements in
series. Thus, the stack order is given by the key accessor (see Stack.keys). -
stackOrderReverse(
List< List< series) → List<List< >num> >int> - Returns the reverse of the given series order [n - 1, n - 2, … 0] where n is the number of elements in series. Thus, the stack order is given by the reverse of the key accessor (see Stack.keys).
-
subset<
T> (Iterable< Object?> a, Iterable<Object?> b) → bool -
Returns true if
ais a subset ofb: if every value in the given iterableais also in the given iterableb. -
sum(
Iterable< num?> iterable) → num -
Returns the sum of all values in the
iterable. -
sumBy<
T> (Iterable< T> iterable, num? accessor(T)) → num -
Returns the sum of all values yielded by the
accessorfunction applied to each element in theiterable. -
superset<
T> (Iterable< Object?> a, Iterable<Object?> b) → bool -
Returns true if
ais a superset ofb: if every value in the given iterablebis also in the given iterablea. -
thresholdFreedmanDiaconis<
T> (Iterable< num?> values, num min, num max) → int -
Returns the number of bins according to the
Freedman–Diaconis rule;
the input
valuesmust be numbers. -
thresholdScott<
T> (Iterable< num?> values, num min, num max) → int -
Returns the number of bins according to
Scott’s normal reference rule;
the input
valuesmust be numbers. -
thresholdSturges(
Iterable< num?> values, [num? min, num? max]) → int -
Returns the number of bins according to
Sturges’ formula;
the input
valuesmust be numbers. -
tickFormat(
num start, num stop, num count, [String? specifier]) → String Function(num) - Returns a number format function suitable for displaying a tick value, automatically computing the appropriate precision based on the fixed interval between tick values, as determined by tickStep.
-
tickIncrement(
num start, num stop, num count) → num -
Like tickStep, except requires that
startis always less than or equal tostop, and if the tick step for the givenstart,stopandcountwould be less than one, returns the negative inverse tick step instead. -
ticks(
num start, num stop, num count) → List< num> -
Returns an list of approximately
count+ 1 uniformly-spaced, nicely-rounded values betweenstartandstop(inclusive). -
tickStep(
num start, num stop, num count) → num - Returns the difference between adjacent tick values if the same arguments were passed to ticks: a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5.
-
timeFormat(
String specifier) → String Function(DateTime) - An alias for TimeFormatLocale.format on the default locale.
-
timeFormatDefaultLocale(
{required String dateTime, required String date, required String time, required List< String> periods, required List<String> days, required List<String> shortDays, required List<String> months, required List<String> shortMonths}) → TimeFormatLocale - Equivalent to TimeFormatLocale.new, except it also redefines timeFormat and timeParse to the new locale’s TimeFormatLocale.format and TimeFormatLocale.parse.
-
timeFormatDefaultLocaleFromJson(
Map< String, dynamic> definition) → TimeFormatLocale -
Equivalent to timeFormatDefaultLocale, but it accepts a JSON
definitionobject instead of individual arguments -
timeParse(
String specifier, {bool isUtc = false}) → DateTime? Function(String) - An alias for TimeFormatLocale.parse on the default locale.
-
timeRange(
DateTime start, DateTime stop, TimeInterval interval) → List< DateTime> -
Equivalent to timeTicks, but takes a time
intervalinstead of count. -
timeTickInterval(
DateTime start, DateTime stop, num count) → TimeInterval? - Returns the time interval that would be used by timeTicks given the same arguments.
-
timeTicks(
DateTime start, DateTime stop, num count) → List< DateTime> -
Returns an list of approximately
countdates at regular intervals betweenstartandstop(inclusive). -
transpose<
T> (Iterable< Iterable< matrix) → List<T> >List< T> > -
Returns a list of lists, where the ith list contains the ith element from
each of the iterables in the
matrix. -
treemapBinary<
T> (HierarchyNode< T> node, num x0, num y0, num x1, num y1) → void -
Recursively partitions the specified
nodeinto an approximately-balanced binary tree, choosing horizontal partitioning for wide rectangles and vertical partitioning for tall rectangles. -
treemapDice<
T> (HierarchyNode< T> node, num x0, num y0, num x1, num y1) → void -
Divides the rectangular area specified by
x0,y0,x1,y1horizontally according the value of each of the specifiednode’s children. -
treemapResquarify<
T> (HierarchyNode< T> parent, num x0, num y0, num x1, num y1) → void - Like treemapSquarify, except preserves the topology (node adjacencies) of the previous layout computed by treemapResquarify, if there is one and it used the same target aspect ratio. The golden ratio, φ = (1 + sqrt(5)) / 2, per Kong et al. is used.
-
treemapResquarifyRatio<
T> (num ratio) → void Function(HierarchyNode< T> , num, num, num, num) -
Specifies the desired aspect ratio of the generated rectangles. The
ratiomust be specified as a number greater than or equal to one. -
treemapSlice<
T> (HierarchyNode< T> node, num x0, num y0, num x1, num y1) → void -
Divides the rectangular area specified by
x0,y0,x1,y1vertically according the value of each of the specifiednode’s children. -
treemapSliceDice<
T> (HierarchyNode< T> node, num x0, num y0, num x1, num y1) → void -
If the specified
nodehas odd depth, delegates to treemapSlice; otherwise delegates to treemapDice. -
treemapSquarify<
T> (HierarchyNode< T> parent, num x0, num y0, num x1, num y1) → void - Implements the squarified treemap algorithm by Bruls et al., which seeks to produce rectangles of a given aspect ratio. The golden ratio, φ = (1 + sqrt(5)) / 2, per Kong et al. is used.
-
treemapSquarifyRatio<
T> (num ratio) → void Function(HierarchyNode< T> , num, num, num, num) -
Specifies the desired aspect ratio of the generated rectangles. The
ratiomust be specified as a number greater than or equal to one. -
tsvFormat(
Iterable< Map< rows, [Iterable<String, Object?> >String> ? columns]) → String - Equivalent to DsvFormat.format with a delimiter of "\t".
-
tsvFormatBody(
Iterable< Map< rows, [Iterable<String, Object?> >String> ? columns]) → String - Equivalent to DsvFormat.formatBody with a delimiter of "\t".
-
tsvFormatRow(
Iterable< Object?> row) → String - Equivalent to DsvFormat.formatRow with a delimiter of "\t".
-
tsvFormatRows(
Iterable< Iterable< rows) → StringObject?> > - Equivalent to DsvFormat.formatRows with a delimiter of "\t".
-
tsvFormatValue(
Object? value) → String - Equivalent to DsvFormat.formatValue with a delimiter of "\t".
-
tsvParse(
String data) → (List< Map< , {List<String, String> >String> columns}) - Equivalent to DsvFormat.parse using "\t" as delimiter.
-
tsvParseRows(
String data) → List< List< String> > - Equivalent to DsvFormat.parseRows with a delimiter of "\t".
-
tsvParseRowsWith<
R> (String data, R? conversion(List< String> , int)) → List<R> - Equivalent to DsvFormat.parseRowsWith with a delimiter of "\t".
-
tsvParseWith<
R> (String data, R? conversion(Map< String, String> , int, List<String> )) → (List<R> , {List<String> columns}) - Equivalent to DsvFormat.parseWith with a delimiter of "\t".
-
union<
T> (Iterable< Iterable< iterables) → Set<T> >T> -
Returns a new set containing every (distinct) value that appears in any of
the given
iterables. -
variance(
Iterable< num?> iterable) → num? -
Returns an unbiased estimator of the population variance
of all values in the
iterableusing Welford’s algorithm. -
varianceBy<
T> (Iterable< T> iterable, num? accessor(T)) → num? -
Returns an unbiased estimator of the population variance
of all values yielded by the
accessorfunction applied to each element in theiterableusing Welford’s algorithm.
Typedefs
- CurveFactory = Curve Function(Path context)
-
The definition of a curve factory: given a
context, returns a curve. -
StackOffset
= void Function(List<
List< , List<List< >num> >int> ) - The definition of a stack offset: given the generated series list and the order index list, it is then responsible for updating the lower and upper values in the series list.
-
StackOrder
= Iterable<
int> Function(List<List< )List< >num> > - The definition of a stack order: given the generated series list, it must return an list of numeric indices representing the stack order.