Version 3.0.0, [October 9th, 2026]

The 3.0.0 release introduces hardware accelerated rendering. The existing API remains compatible; the changes in behavior are listed below, starting with the ones that may need attention when upgrading.

Migration notes

A page that embeds the visualization with default options and does not look at its canvases needs no changes. Check the following points if the page does more than that:

  1. WebGL is the default renderer. renderer defaults to auto, which picks WebGL when it is hardware accelerated. Set renderer to canvas to keep the previous renderer if the page: uses canvas gradients or patterns in onBeforeGroupDrawn (WebGL accepts CSS color strings only); reads pixels of the main canvas, in onRedraw or with getContext("2d") (use imageData or onFrameDrawn instead); tunes radialTextureStep, angularTextureStep or textureOverlapFudge (they have no effect with WebGL); or compares screenshots pixel by pixel (edges and labels are antialiased slightly differently).
  2. The picture is drawn at the screen's pixel ratio. pixelRatio defaults to auto instead of 1, so on high-density screens the canvases are larger than the element and more work is done per frame. Set pixelRatio to 1 for the previous resolution and cost. Code that assumed the canvas size equals the element size should use the pixelRatio reported in the layout attribute; pages that passed window.devicePixelRatio can drop that.
  3. Pixel ratios other than 1 lay out differently. Sizes are in CSS pixels now, so a page that tuned minRadialPadding, minAngularPadding, the texture steps or percentage font sizes at a pixel ratio of 2 will see them change; re-tune them against the new picture. Changing pixelRatio no longer reloads the model, so nothing arrives in onModelChanged on that occasion.
  4. The visualization resizes itself. With autoResize on by default, a change of the container's size lays out and redraws the picture without a resize() call. Pages that throttle resizing or deliberately keep the picture scaled should set autoResize to false; plain resize() calls can stay.
  5. The canvases moved into a wrapper element. Style sheets and scripts that select the canvases as direct children of the embedding element need adjusting, and the main canvas element is replaced when the renderer changes, so references to it should not be kept.
  6. dispose() does something now, and embedding a new visualization in an element that holds one disposes of the previous instance, whose methods then do nothing. Pages that re-embed into the same element and keep using the old instance need to switch to the new one.
  7. selection, open and zoom given in the embedding options take effect. They used to be ignored there, so a page that passed them by mistake will now see them applied.
  8. groupShape() returns undefined for unknown identifiers instead of throwing; code that caught the exception should check the result.
  9. Assertions reject models that are not trees. With carrotsearch.circles.asserts.js loaded, a dataObject with a group object under two parents, or containing itself, is reported in the console and ignored. Such a model was never drawn correctly; fix the data.

New features

WebGL renderer

The visualization can now be drawn with WebGL 2: groups, outlines and labels are rendered by shaders on the graphics card. The new renderer attribute selects between webgl, canvas (the software renderer of the previous versions) and auto, the default, which uses WebGL when it is hardware accelerated. The read-only activeRenderer attribute tells which renderer is in use and the onRendererChanged event reports changes, including the automatic fallback to the canvas renderer when WebGL is not available or its context is lost.

SVG renderer

Setting renderer to svg draws the visualization as an SVG document, with groups as paths and labels as text along arcs. It is meant for resolution independent output; it is slower than the other renderers and is never chosen automatically. Safari renders right-to-left scripts on curved labels in reversed order because of a WebKit bug in text on paths (bug 275313); the other renderers are not affected.

Three-dimensional transitions

Two new effects for the WebGL renderer: explode3d for pullbackAnimation breaks the visualization into tiles that fly towards the viewer, implode3d for rolloutAnimation assembles it the same way. The other renderers play explode and implode instead, and random does not pick the new effects.

onFrameDrawn

A new event fired when a frame is completely drawn. It provides the canvas with the frame, so that the picture can be copied, with either renderer.

on(), off()

New methods for adding and removing listeners of individual events without replacing the listeners already registered.

defaults

A new static property CarrotSearchCircles.defaults with the default values of all attributes.

isSupported()

A new static function CarrotSearchCircles.isSupported(options) tells whether a visualization with the given options can be displayed: it returns false when the browser has no 2D canvas, or when the options ask for the webgl renderer and WebGL cannot be used. The static supported property, which only checks for a 2D canvas, is deprecated in its favor.

dispose()

The dispose() method now releases all resources held by the visualization.

isGroupHoverable

A new callback that excludes individual groups from hovering: an excluded group gets no hover outline, is left out of hierarchy outlines and is not reported by onGroupHover.

autoResize

The visualization now follows the size of its container element: a change of the element's size lays out and redraws the picture, as a call to resize() did before. Pages that size the visualization under program control can set the new autoResize attribute to false; existing resize() calls are harmless either way.

Changes in behavior

Pixel ratio

The default pixelRatio is now auto: the visualization draws at the browser's pixel ratio (window.devicePixelRatio) and follows its changes on resize(), so that it is as sharp as the rest of the page on high-density screens without any configuration. Pages that passed window.devicePixelRatio explicitly can drop that; set pixelRatio to 1 to get the previous default, which is faster on high-density screens at the cost of sharpness. The pixel ratio in effect is reported in the layout attribute; get("pixelRatio") returns auto.

The layout no longer depends on pixelRatio: all sizes are in logical (CSS) pixels and the pixel ratio only sets the resolution of the picture. Nothing changes at a pixel ratio of 1. At other pixel ratios:

  • minRadialPadding, minAngularPadding, radialTextureStep, angularTextureStep and textureOverlapFudge are now in logical pixels (they used to be in physical pixels, so their effect shrank as the pixel ratio grew), and so are the smallest label size and the distance groups travel in the explode, implode and rollout animations;
  • percentage values of groupMinFontSize, groupMaxFontSize, titleBarMinFontSize and titleBarMaxFontSize are no longer multiplied by the pixel ratio twice;
  • values reported by onLayout and groupShape() may differ by a fraction of a pixel, and the size of the canvas is rounded, not truncated;
  • changing pixelRatio redraws the visualization without reloading the data model (no rollout animation, no onModelChanged event).

resize() now reliably returns false when the size has not changed, also at fractional pixel ratios.

HTML structure

The canvases of the visualization are now placed inside a wrapper div in the element the visualization is embedded in. Style sheets or scripts that select the canvases as direct children of that element need to be adjusted. With the WebGL renderer, the main canvas has a WebGL context (a 2D context cannot be obtained from it) and the canvas element is replaced when the renderer changes.

dispose()

In previous versions dispose() did nothing. It now removes the visualization from its element; methods of a disposed instance do nothing. Embedding a visualization in an element that already contains one disposes of the previous instance.

WebGL renderer

The following only applies when the WebGL renderer is in use (set renderer to canvas to get the previous behavior):

  • radialTextureStep, angularTextureStep and textureOverlapFudge have no effect, labels are mapped onto groups exactly;
  • textureMappingMesh shades the area of each label instead of drawing a mesh;
  • onBeforeGroupDrawn must set groupColor to a CSS color string, canvas gradients and patterns are not supported;
  • pixels of the main canvas cannot be read in onRedraw, use the imageData attribute to get the picture;
  • the picture differs slightly in the antialiasing of edges and labels.
selection, open, zoom

These attributes now take effect when passed in the embedding options; previously they were silently ignored there and only worked with set(). A specification given at embedding time also no longer prevents the same specification from being applied with set() later.

groupShape()

Group shapes are available right after the layout, before the first redraw, and groupShape() returns undefined for unknown group identifiers.

Assertions

With carrotsearch.circles.asserts.js loaded, a dataObject that is not a tree, with a group under two parents or among its own descendants, is reported in the console, naming the group and where it appears, and ignored like any other invalid attribute.

Version 2.3.10, [July 14th, 2022]

The 2.3.10 release fixes zoom triangle drawing (triangles could be drawn outside their group area).

Bug fixes

[CIRCLES-GH-3]

Zoom triangles could extend beyond their group area. Zoom triangles are now drawn properly. An additional improvement includes drawing narrower zoom triangles if the zoomed group is very narrow itself.

Version 2.3.9, [June 6th, 2022]

The 2.3.9 release adds a few options to allow full customization of group selection and hover coloring.

New features

[CIRCLES-GH-1]

These two new options groupSelectionOutlineStyle and groupHoverOutlineStyle determine the shape drawn for selected and hovered-on groups. Please see examples in the API documentation for details.

[CIRCLES-GH-2]

An expert-level callback onBeforeGroupDrawn has been added to aid in situations when the default color model is not sufficient or needs to be changed in between group redraws. Please see examples in the API documentation for details.

Version 2.3.8, [January 19th, 2021]

The 2.3.8 release exposes Circles as an NPM dependency for modern software building systems.

New features

[CIRCLES-243]

Starting with version 2.3.8, in addition to the conventional downloaded package, Circles is also available as an NPM dependency. Both the branded demo and the non-branded licensed builds are available in the new format.

Bugs

[CIRCLES-241]

Circles would not properly render visualization updates, such as data model or attribute changes, while its container element had the display: none style. Version 2.3.9 fixed this issue; parameter and model updates will redraw the backing canvas accordingly.

Note that the container element must still be visible at least once (upon embedding or at least one call to resize) so that its dimensions are known to the visualization.

Version 2.3.7, [December 11th, 2018]

This is a maintenance release fixing an issue with label rendering.

Deprecations, migration guide

[CIRCLES-240]
groupLinePadding property has been deprecated and will be ignored. Instead, use line-height-relative groupLinePaddingRatio.

Bugs

[CIRCLES-239]
Truncated labels on Chrome and Firefox. This is due to changed interpretation of canvas's textBaseline property in both browsers (spec-compliant). We rewrote the entire font metrics collection routine as part of this issue. Labels should no longer be truncated, even if certain glyphs protruded outside of the typical line area.

Version 2.3.6, [December 16th, 2016]

This is a maintenance release.

Bugs

[CIRCLES-237]
Inscribed title bar did not obey centerx and centery shifts.
[CIRCLES-236]
Spurious layout() invocation on retrieving image data.

Version 2.3.5, [November 9th, 2016]

This is a maintenance release fixing a regression in release 2.3.4.

Bugs

[CIRCLES-235]
Release 2.3.4 added a feature of removing expanders for groups from which all the children have been removed by means of the isGroupVisible callback. Unfortunately this also introduced a regression bug: when this callback wasn't declared at all, no expanders would be drawn at all. This fixes this issue.

Version 2.3.4, [September 22nd, 2016]

This is a maintenance release fixing a problem with expanders and invisible groups.

Bugs

[CIRCLES-234]
This fix addresses the situation in which all subgroups of a parent group were hidden (by means of the isGroupVisible callback), and visibleGroupCount limit was used to display an expander triangle. In such a scenario the group expander was still displayed, even though there was nothing to display.

Version 2.3.3, [February 26th, 2016]

This is a maintenance release fixing a critical bug in release 2.3.2.

Bugs

[CIRCLES-233]
Release 2.3.2 introduced a critical bug which leads to JavaScript code breaking on undefined property 'options'.

Version 2.3.2, [February 9th, 2016]

This is a maintenance release fixing a minor glitch in image data property rendering.

Bugs

[CIRCLES-232]
imageData does not redraw labels correctly if deferLabelRedraws is enabled.

Version 2.3.1, [September 24th, 2015]

This maintenance release brings minor new features, improvements and cosmetic bug fixes.

New features

[CIRCLES-223]
Added the update method which allows animating weights of existing groups.
[CIRCLES-228]
Added the element option for providing the DOM element in which Circles is to be embedded.
[CIRCLES-221]
Added "documents-in-cluster" component example known from Circles flash.

Improvements

[CIRCLES-225]
Enabling the logging attribute results in immediate console feedback (instead of being quiet).
[CIRCLES-229]
Deprecated property webkitMovement* warnings are no longer emitted.

Other changes

[CIRCLES-226]
Removed 0x0 pixels container element size warning. The visualization will work with 0x0 containers, but it won't display anything (and must be resized manually once the element changes size).

Version 2.3.0, April 9th, 2014

This release brings a roundup of bug fixes from the maintenance branch and a few minor features.

New features, Improvements

[CIRCLES-219]
Make the default logo a tad smaller (esp. for demo version).
[CIRCLES-214]
Added pixelRatio to imageData for compatibility with FoamTree and easier higher-resolution visualization captures.
[CIRCLES-217]
Added a simple demo of using WebFonts to simulate Circles 1.x look.
[CIRCLES-218]
The color of zoomed-in group decorations is now customizable via zoomDecorationFillColor and zoomDecorationStrokeColor.

Bugs

[cumulative]
A roundup of all bugs and minor enhancements from the 2.2.x maintenance line.

Version 2.2.4, February 4th, 2014

This is a bugfix release.

Bugs

[CIRCLES-213]
Assertions should allow CSS predefined color names, such as "black".
[CIRCLES-212]
An exception could be thrown when changing from a null model and modifying visualization attributes in onModelChanged.
[CIRCLES-211]
Opening all groups on an empty model causes an exception.
[CIRCLES-210]
Circles does not work for containers with 0x0 size (throws InvalidStateError and becomes unusable).
[CIRCLES-208]
Fixed documentation typos (related to onload event).

Version 2.2.3, October 2nd, 2013

This is a bugfix release.

Bugs

[CIRCLES-205]
Selection and hover are not properly displayed (regression in version 2.2.2).

Version 2.2.2, September 3rd, 2013

This release brings a bunch of minor fixes and tweaks.

New features, Improvements

[CIRCLES-195]
nhttpd starts on port 8080 by default.
[CIRCLES-202]
imageData and other attributes with odd defaults should not show up in the documentation.
[CIRCLES-199]
onGroupClick and onGroupDoubleClick now expose ctrlKey, shiftKey, altKey and metaKey properties.
[CIRCLES-204]
An example of handling dynamic removal of groups from view.

Bugs

[CIRCLES-200]
An invisible group should not display selection.

Version 2.2.1, July 17th, 2013

This release corrects the example snippets for mobile devices and fixes an issue with IE10 event propagation. The visualization code is identical to 2.2.0.

Bugs

[CIRCLES-196]
Click-through layer events are not propagated on IE10 (examples only).
[CIRCLES-192]
Screen not refreshing properly on an iPhone after orientation change (examples only).

Version 2.2.0, June 19th, 2013

This release brings a bunch of new features.

New features, Improvements

[CIRCLES-187]
groupShape() function to retrieve each group's current shape. This can be used to track groups on screen and this demo shows where such a feature may be handy.
[CIRCLES-115]
Integrated title bar component. See titleBar attribute and the simplest showcase example.
[CIRCLES-182]
Added read-only layout attribute for accessing the current (most recent) layout state.
[CIRCLES-181]
Support for multiple callback listeners. Check out this section of the manual for a description of how to pass multiple callback listeners to the visualization.
[CIRCLES-184]
An example of an external title bar component handling via callback events.

Bugs

[CIRCLES-190]
The deprecated attribute angleEnd does not work as advertised.
[CIRCLES-186]
Double click was emitted when position delta was higher than some threshold.
[CIRCLES-185]
onRedraw callback was never called. Also improved the documentation on this callback.
[CIRCLES-177]
Endless loop freezing the browser on expanding a single group at the root level.

Deprecations, migration guide

[CIRCLES-181]
The new multiple callback listeners feature is designed to be backwards compatible but there are minor deviations from previous behavior. The value returned from the visualization on get() calls will always be an array of functions bound to the given callback (it was previously the current function reference). Where callbacks return a value (as in onBeforeSelection), any callback can veto the change (mutual consensus is not required).

Version 2.1.0, February 26th, 2013

This release brings a number of improvements to the core animation and rendering routines, documentation and examples. Make sure to check out the list of examples, as well as the new documentation.

New features, Improvements

[CIRCLES-138]
New documentation, all API examples are now executable.
[CIRCLES-166]
The distribution bundle now comes with an assertions file which can be included in your pages during development, this will result in validation of attributes and other helpful messages printed to the console. See the debugging section in the API reference for more information.
[CIRCLES-127]
attributionSize callback to make attribution logo size customizable (in particular when branding is locked).
[CIRCLES-124]
Clockwise and counterclockwise layout directions are now possible via angleWidth attribute. Check out this example for the possibilities.
[CIRCLES-119]
Add isGroupVisible callback attribute to allow invisible groups (gaps). Check out this example to see an example where this can be useful.
[CIRCLES-109]
Seamless handling of label blending on rapid succession of tweens.
[CIRCLES-110]
Configurable model change animation parallelism via the modelChangeAnimations attribute.
[CIRCLES-143]
String weights that are numeric are respected.
[CIRCLES-154]
Tweaks to the default rainbow color model.
[CIRCLES-139]
Added ringShape attribute for non-uniform, customizable per-group ring sizes.
[CIRCLES-155]
Allow bubbling mouse events (disable capturing) via captureMouseEvents option.
[CIRCLES-158]
ratioAspectSwap allows controlling label aspect (radial/angular).
[CIRCLES-165]
Explicit control of attribution fade-in time with attributionFadeInTime attribute.

Bugs

[CIRCLES-172]
Control key could be undetected in events under Internet Explorer.
[CIRCLES-108]
Performance regressions on initial loading and fast transitions.
[CIRCLES-117]
Hover highlights don't show on IE9 and Safari.
[CIRCLES-118]
Logo images could be slightly blurred.
[CIRCLES-121]
Changing selection via an API call produces a callback event.
[CIRCLES-140]
Sequential model change does not work for rapid succession of calls.
[CIRCLES-142]
When a container with fixed positioning is used, mouse coordinates are incorrect.
[CIRCLES-144]
Removed enforced label fade out times with certain rollout/pullback transitions.
[CIRCLES-148]
imageData property could still be black during onRolloutComplete when no animations were used.
[CIRCLES-149]
It is not possible to apply open attribute to the root object.
[CIRCLES-156]
Attribution image may disappear after window is resized.
[CIRCLES-157]
Incorrect callback arguments for centerx, centery and diameter if pixelRatio != 1.
[CIRCLES-163]
NaN can appear in rainbow color calculation (luminance) if parent.groups.length == 1.
[CIRCLES-164]
Group identifier that evaluated to false was not properly detected (an id of '0' for example).

Deprecations, migration guide

[CIRCLES-124]
angleEnd parameter has been deprecated and will be removed in future versions. Please change your code to use the more flexible alternative: angleWidth.
[CIRCLES-122]
Removed deprecated attributes: selectionColor, selectionOutlineColor and selectionOutlineWidth to comply with FoamTree API. They are now called, respectively: groupSelectionColor, groupSelectionOutlineColor and groupSelectionOutlineWidth.

Version 2.0.3, January 14th, 2013

Maintenance branch for 2.0.x release.

Bugs

[CIRCLES-122]
Aliased selectionColor, selectionOutlineColor and selectionOutlineWidth to comply with FoamTree API. They are now called, respectively: groupSelectionColor, groupSelectionOutlineColor and groupSelectionOutlineWidth. Aliased old attributes will be removed in release 2.1.0.
[CIRCLES-121]
Changing selection via an API was producing a callback event which is inconsistent with the API description and might have led to endless loops.

Version 2.0.2, December 27th, 2012

Maintenance branch for 2.0.x release.

Bugs

[CIRCLES-117]
Hover highlights don't show on IE9+ and Safari.
[CIRCLES-116]
Label component has differing canvas and CSS dimensions.

Version 2.0.1, December 20th, 2012

Maintenance branch for 2.0.x release.

New features, Improvements

[CIRCLES-110]
Configurable model change animation parallelism via the modelChangeAnimations attribute.

Bugs

[CIRCLES-109]
Seamless handling of label blending on rapid succession of tweens.
[CIRCLES-108]
Performance regressions on initial loading and fast transitions.

Version 2.0.0, December 6th, 2012

Official release of Circles HTML5. Reimplementation from Flash to HTML5.

Version 2.0.0-rc2, November 21st, 2012

Circles HTML5 release candidate 2.

Version 2.0.0-rc1, November 16th, 2012

Circles HTML5 release candidate 1.