Repository navigation
Releases
v0.10.0 - the 1.0 API review: set() only, bar { category, value }, sizing, named formats, 24-hour ticks
v0.10.0 -- the 1.0 API review: set() only, bar { category, value }, sizing, named formats, 24-hour ticks
Internal release, not published to npm. The first published release will be 1.0.0,
after this one has run live for a while. Every Changed and Removed item breaks 0.9.0 code.
Changed
- set() is the only way to change a chart; the graph and its x/y/color are sealed, and
assigning any key throws naming the set() call. Internals moved to graph._. - $svg is the , $plot the margin-shifted , $marks the marks layer.
- update(data, domains); x.type instead of x.scale; d3.easygraph.bar instead of bars.
- A bar is { category, value }; categories are the union of all series, stacked by category.
- sizing: 'fluid' | 'scaled' (width only with 'scaled'); scatter zoomScale(k) replaces rescale(k).
- syncZoom/syncCrosshair return a function that undoes the link; the zoom event is { transform, x }.
- palette(name, { classes, reverse }), palettes, colorScale({ ... }); presets renamed to
quantity + unit; convert is not a config key. - tickFormat 'multi' is gone; a time axis ticks on a 24-hour clock; formatNumber is module-level.
- scatter points: false draws no circles; bands: true draws both bands.
Added
- d3.easygraph.formats: date, datetime, date-short, datetime-short, extensible.
- crosshair: { format: { x, y } }, taking what tickFormat takes.
- Presets: windSpeedKnots, visibilityKm/Mi, distanceCm/In, illuminance, co2, pm25, pm10,
soilMoisture, uvIndex, signalStrength, electricEnergy.
Removed
- round, compassPoint16/8/4, hueWheelPalette, color.preset.
Fixed
- The crosshair tooltip formats its values; a heatmap null cell is drawn empty.
Docs
- CHANGELOG has one block per version, the net change from the version before.
v0.9.0 — strict nested config, negative bars, tickFormat, bearing arrows
v0.9.0 -- strict nested config, bars with negative values, tickFormat, bearing arrows
Internal release, not published to npm. The first published release will be 1.0.0,
after this one has run live for a while.
Changed
- paletteColors(name, classes) and preset(name) replace resolvePalette and resolvePreset.
- Nested options are validated like top-level ones: a typo in x/y, color, margin, points,
arrows, labels, voronoi, zoom, crosshair, bands or a series entry throws with a
did-you-mean, and so does an unknown key in update()'s ranges argument. - line: lines defaults on (off on a stacked chart); the crosshair event carries { x, pixel }
and syncCrosshair no longer needs zoom. - scatter: arrows take a compass bearing in degrees (headAngle in degrees too); points join
on id only, label is display text. - x.timeFormat is x.tickFormat ('multi', a format string, or a function) on both axes.
- bars: a datum's own color is used when present (colorPerData is gone).
- Assigning x/y preset, convert, tickFormat or tickLabels, color.quantize or preset, or
graph.width now throws like the other build-time keys.
Added
- bars take negative values: grouped bars hang from zero, stacked bars pile positives up
and negatives down.
Removed
- The six LS- palettes (site-specific) and every migration error for names that were
only ever in internal builds.
Docs
- README reorganized around the 14 patterns the API follows.
v0.8.0 — sigmaBand, compass labels, stable identity
v0.8.0 -- sigmaBand, compass labels, stable identity
Internal release, not published to npm. The first published release will be 1.0.0,
after this one has run live for a while.
Fixed
- scatter joins its point circles by label (index only for unlabeled points), so a point
set that changes size between update() calls no longer makes circles fly across the chart. - line skips the path transition for a series whose point count changed, so toggling
hourly/daily no longer warps the shape mid-animation.
Added
- line: sigmaBand, a mean +-1 sigma band nested inside the min/max ribbons.
- compassPoint16/8/4(direction): nearest compass label for a bearing.
Docs
- README reorganized into per-family sections and brought up to date.
v0.7.0 — Pre-1.0 hardening
v0.7.0 -- Pre-1.0 hardening
Internal release, not published to npm. The first published release will be 1.0.0,
after this one has run live for a while.
Fixed
- The caller's config object was used as the chart object, so a second chart built from
the same config silently corrupted the first -- its height drifted, both handles
pointed at one chart, and destroy() left the first orphaned in the DOM. - The stylesheet's bare #title/.tick/.axis selectors restyled host-page elements just
from loading the file. Everything is now scoped under .easygraph. - Only line charts re-rendered their axes on resize; bars/heatmap/scatter left ticks
frozen outside the plot area. - The package's main entry crashed on require/import, and 17 internal helpers leaked
onto window. Both solved by the new UMD wrapper. - heatmap.update([]) threw; update() on a destroyed chart silently succeeded; a height
smaller than its own margins produced a negative plot area; mode/scale/orientation
typos rendered the wrong chart with no complaint.
Changed
- areas -> ribbons, interpolate -> curve, oneYear -> timeFormatMulti, noTick ->
tickLabels, PALETTE_COLORS -> paletteColors, orientation 'v'/'h' -> full words,
bars' d.c -> d.color, update(data, xRange, yRange) -> update(data, ranges). - The six hand-picked palettes now carry an LS- marker.
Added
- UMD build; accessibility (role/aria-label/<title>); stackedArea; per-point bubble
radius; legendItems() plus anamesconfig; ranges.color; data-shape validation;
and a Public API section defining what semantic versioning actually covers.
130 tests, up from 74.
v0.6.0 -- Color: named palettes, Turbo, per-family defaults
Added
- Sequential.Turbo, and a general interpolate-only-scheme fallback in
schemeColors() -- resolves any scheme that ships only as
d3.interpolateX(t) with no discrete d3.schemeX array, sampled at 9
points by default or a caller-specified classes count. - Qualitative.Tableau10 and Qualitative.Observable10, alongside
Qualitative.Category20/20b/20c. - Qualitative.SunArc (#F84/#FC4/#B12), a hand-picked sunrise/noon/sunset
triad. - d3.easygraph.resolvePalette(name, classes) and colorScale(name, domain,
options), standalone palette lookups usable without building a chart. - d3.easygraph.hueWheelPalette(count), evenly-spaced hues as [r,g,b]
triples for canvas point-cloud coloring. - scatter: color.quantize, labels/labelMinZoom, rescale(k), fixed
color.domain. - line/areas: a null y (or min/max) now breaks the path into a gap
instead of drawing a straight segment through it.
Changed
- Every palette name is now Kind.Name (Sequential.Blues, Diverging.RdYlBu,
Qualitative.Set1) instead of source-prefixed (D3_category10,
LS_SustainZones). .reversed replaces _reversed. - Default colorPalette is now Qualitative.Tableau10, replacing
Qualitative.Category10 (removed entirely) -- better separated under
red-green color vision deficiency. - colorbrewerPalettes renamed to colorPalettes.
- Palettes now sourced directly from d3-scale-chromatic's d3.scheme*
exports instead of the standalone colorbrewer package -- drops that
dependency. - heatmap's default colorPalette is now Diverging.RdBu.reversed instead
of the shared Tableau10.
Fixed
- line's zoom pane now sets touch-action: none, so a pinch/drag gesture
starting on it can't be hijacked by iOS's native pinch-to-zoom.
v0.4.0 — Unit conversion
Added
d3.easygraph.getUnit(name)— returns a preset (or the genericdefaultfallback, for a
falsy/unrecognized name) as a complete, ready-to-use{ label, unit, scale, convert, range }.
Usable standalone, no chart or container needed — e.g. converting a raw value for a map marker.d3.easygraph.round(x, n)— rounds tondecimal places, moved out ofweather/report.phpand
sensors/report.php, which each defined an identical local copy. Deliberately preset/range-
agnostic — precision is always caller-specified, not derived from a preset'srange— same
explicit-nbehavior as the two pages' old local helper.- Every preset's
convert(v)now optionally takes a second argument,convert(v, d), rounding the
converted result toddecimal places (sugar forround(convert(v), d)).convert(v)alone is
unchanged and stays unrounded, so a consumer needing full precision (e.g. interpolating a
continuous color scale) isn't forced to lose it.
Changed
- The 5 presets with a real conversion now reference a named formula function (e.g.
_temperatureC2F) instead of an inline anonymous one — reads more like a table of unit
conversions, easier to scan than 5 separatefunction(v) { return ...; }literals. - Presets and config resolution split out of
core.js:d3.easygraph.presets/getUnit()live in
units.js— a small, easygraph-agnostic lookup with no config merging or chart concepts of its
own — while_resolveProperty(folding a preset onto a graph's x/y/color config) moved into
core.js, the only actual consumer of that resolution. label(andunit) are now genuinely optional._resolvePropertyno longer falls back to a
generic call-site placeholder ("Property X"/"Property Y"/"Property Color") when neither the
caller nor a preset supplies one — it stays unset, and the chart title renders blank (d3's
.text()treatsundefined/nullas empty) instead of showing that placeholder text. No page
ever actually saw "Property X"/"Property Y"/"Property Color" live — every page either set its own
label or a" "(literal space) placeholder specifically to avoid it — so that hack is gone too.- Presets express their raw-to-display conversion as a
convert(v)function instead of linear
m/ncoefficients — supports non-linear conversions, and reads as "how do I convert this
value" rather than a formula the caller has to remember. Every preset (including the generic
defaultfallback) now declares its ownconvertexplicitly, sogetUnit()always returns
something complete in one lookup. - Every real preset now declares its own
scale: 'linear'(it genuinely affects tick formatting —
core.jschecksscale === 'linear'specifically, not just "anything but time"), instead of
relying solely ondefault's copy.defaultkeeps its own copy too, as the fallback for
properties with no preset at all. - The generic fallback merged when a property has no preset (or an unrecognized one) is now a real
defaultentry ind3.easygraph.presets, not an object literal hardcoded inside the resolver.
{ preset: "default" }is equivalent to omittingpresetentirely.
Removed
dewPointCanddewPointFpresets — unused across everyPublic/htmlpage and, after a DB
migration, thelarsi-sensorsdatabase. Dew point readings that useddewPointFnow use
temperatureFinstead (same unit/conversion/range, no dedicated preset needed).noTick: falsefrom the generic fallback — it's an axis-rendering choice, not a unit concept,
and every read of it (if (graph.x.noTick)) already treatsundefinedthe same asfalse.