This corrects the handling of lines that are long enough to have two
visible or invisible endpoints, but still cross the small circle and
thus have an invisible or visible intermediate segment.
Fixes#1127.
You can now pass a format specifier to scale.tickFormat (for linear, pow and
identity scales). If the format specifier doesn't have a defined precision, the
precision will be set automatically by the scale, returning the appropriate
format. This provides a convenient, declarative way of specifying a format whose
precision will be automatically set by the scale.
This works with axes, too! For example, `axis.ticks(10, "%")` will now use a
percentage format rather than the default format, while still computing the
appropriate precision.
This commit also includes a fix to make d3.format more robust when unreasonable
precisions are specified. Rather than throwing an error, the nearest reasonable
value is used instead.
Fixes#912.
This adds d3.geo.transverseMercator and removes the custom default scales from
the mercator and equirectangular projections. Also, this commit removes the
built-in 2π scale factor from the mercator projection, simplifying the
implementation and making it consistent with transverseMercator and GDAL. This
is a partial fix for #1133; see also d3/d3-plugins#55.
Previous versions of JSDOM erroneously returned null rather than the empty
string, but this has now been fixed. Note: this depends on tmpvar/jsdom#582
which has not yet been merged to master.
The previous implementation of format, which only supported arrays as input, is
retained as d3_dsv.formatRows; for backwards-compatibility, d3_dsv.format allows
both arrays and objects as input (to be removed in 4.0). This change makes
format and formatRows symmetric with parse and parseRows, respectively.
To compute the set of fields from all objects, two passes are required. Fields
are listed in discovery order, so that in the common case where all fields are
defined on all objects, the order of columns in the generated DSV will match the
property iteration order of the first object.
This supersedes #1106 and fixes#509; thank you to @smcgivern and @hammer for
suggesting this feature.
Similar to selection.select(function), the before argument to selection.insert
can now be specified as a function, so that the caller can specify the before
node dynamically. Supersedes #1071.
You can now pass a map type to d3.nest’s map function. For example, if you pass
d3.map as the second argument to nest.map(array, type), the returned value will
be an instance of d3.map rather than a bar object. In addition to offering
better protection against built-in property names, d3.map offers more convenient
iteration methods.