Skip to main content

GoJS Change Log

We maintain a GitHub Repository that you can star to follow version updates.

GoJS 4.0

GoJS 4.0 brings a number of new features.

  • Performance improvements for large graphs, especially during dragging and object picking.
  • ForceDirectedLayout has been re-implemented to be much faster.
  • Several improvements for stronger type checking and use with AI tooling. Regardless of tooling, we will continue to make it easier to create and verify code.
  • The functionality of the Robot extension has now been merged into the Diagram class.
  • We have added a HeatMap extension.

API Improvements for Structured Authoring

  • Added typed constant objects for string-based registries, providing autocomplete and compile-time checking for values that were previously plain strings. The new constants are: Figures, Arrowheads, PanelTypes, ToolNames, Builders, and LayerNames. For example, go.Figures.RoundedRectangle instead of "RoundedRectangle", or go.Arrowheads.Standard instead of "Standard". Corresponding union types (FigureName, ArrowheadName, PanelTypeName, ToolName, BuilderName, LayerName) are exported for use in TypeScript. However, because the programmer can define new names for each of these kinds of things, those types only represent the built-in subset of possibilities.
  • Model classes are now generic, accepting NodeDataType and LinkDataType type parameters. These can be optionally specified to get stronger type checking on model data, and in methods such as Model.nodeDataArray, GraphLinksModel.linkDataArray, Model.copyNodeData, and GraphLinksModel.copyLinkData. Model, TreeModel, and GraphLinksModel accept a NodeDataType parameter, while GraphLinksModel accepts both NodeDataType and LinkDataType. These default to ObjectData and are fully backward compatible.

Model typing examples:

ts

Other New Features and Changes for GoJS 4.0

New features of ForceDirectedLayout:

  • ForceDirectedLayout now uses a Barnes-Hut approximation algorithm, that uses a quadtree to render large graphs significantly faster. We have observed 7-10x performance boosts on graphs with node counts in the low thousands.
  • The ForceDirectedLayout.theta parameter has been added. This parameter controls the accuracy versus speed of the layout. Higher values of theta will produce a faster, but potentially less accurate, layout.

Incompatible changes in ForceDirectedLayout:

  • Repulsion between Nodes no longer scales as aggressively with the size of the nodes. If you are using a ForceDirectedLayout with large, or varying, node sizes, you may have to increase the value ForceDirectedLayout.defaultElectricalCharge.
  • Some parameters have changed their default values, which should produce strictly better results for most use cases:
  • The default value of ForceDirectedLayout.moveLimit has changed from 10 to Infinity, which allows nodes to move arbitrarily far per iteration. For large layouts performed all at once, this will produce better results. If your layout is small or incremental, you may have to set a value for this parameter to prevent nodes from moving too much during incremental changes.
  • The default value of ForceDirectedLayout.infinityDistance has changed from 1000 to Infinity, which means Nodes will always interact regardless of how far apart they are. For large layouts performed all at once, this will produce better results. If your layout depends on a limited distance between interacting Nodes, you may have to add an explicit value for this parameter.

Added the HeatMap extension, which assumes each Node or Link could have a temperature used in drawing a heat map in the viewport. There is also a HeatMap.renderImageData method to generate a raster image for any given area.

The functionality of the Robot extension class for simulating mouse and keyboard events has been moved into the Diagram class, with the method names prepended with "emit..."/. This makes it easier to write regression tests and automation scripts, because you no longer need to load the Robot extension code. The Robot extension has been deprecated, although for compatibility it remains in the extensionsJSM and extensions directories. The Robot sample has been rewritten to call the new Diagram methods. The new methods are:

The maxSize option used by Diagram.makeImageData and Diagram.makeImage has been moved from the DiagramRendererOptions interface to the ImageRendererOptions interface. And due to increased memory available in all devices, the default value has increased from 2000x2000 to 4000x4000.

Other New Features and Changes

Bug fix changes in 4.0 since 3.1

  • ToolManager.GestureMode now works without needing to alter CSS.
  • Fixed some uses of GraphObject.shadowVisible incorrectly propagating a no-shadow rule.
  • Clicking on a button in GoJS no longer triggers a focus ring as if a keyboard was used.

Old Change Logs

Change log for 3.1

Change log for 3.0

Change log for 2.3 (unsupported)

Change log for 2.2 (unsupported)

Change log for 2.1 (unsupported)

Change log for 2.0 (unsupported)