Release 1.0.0
We are excited to announce the first release of VisuallyJs.
VisuallyJs builds upon JsPlumb's 17 years of experience providing the foundation for world-class visual applications and diagrams, with a brand new rendering engine which is up to 3 times faster than JsPlumb, modernised integrations with React, Angular, Vue and Svelte, a comprehensive charting engine, a dedicated SVG diagram rendering engine, and a whole host of other additions and improvements.
Solutions
VisuallyJs is a professional solution that can help you get to market in record time with several different types of applications.
Diagrams
In JsPlumb it was possible to create a pure SVG diagram but there was a certain amount of boilerplate that it was necessary to setup. VisuallyJs offers dedicated SVG diagram support that is a snap to include in your page:
import { DiagramComponent, DiagramProvider, DiagramPalette } from "@visuallyjs/browser-ui-react"
import { FLOWCHART_SHAPES } from "@visuallyjs/browser-ui"
export default function MyDiagram() {
return <DiagramProvider>
<DiagramComponent options={{
shapes:[FLOWCHART_SHAPES]
}}/>
<DiagramPalette/>
</DiagramProvider>
}
Charts
VisuallyJs offers a powerful 2D chart engine with support for a number of common charts such as bar/column, scatter/bubble, area, line and pie, as well as more specialized charts such as Sankey. As with diagrams, these are very simple to drop into your page:
import { BarChartComponent } from "@visuallyjs/browser-ui-react"
export default function MyChart() {
return <BarChartComponent options={{
series:[ {valueField:"value"}]
}} data={{...}}/>
}
Apps
VisuallyJs continues JsPlumb's role as the premium solution for apps where the nodes have rich content, and improves upon the ergonomics of JsPlumb's API to make it easier than ever to rapidly create a compelling user experience.
Dashboards
This image shows our Network Infrastructure starter app, in which the diagram canvas and the two charts on the side are all powered by the same model. The possibilities for this are endless.
Updates
VisuallyJs started out as a rewrite of the JsPlumb core engine but ended up becoming something much larger, even getting a new name! Here we present an inexhaustive list of updates made in VisaullyJs.
New Features
- 3x faster rendering engine
- Charts module, with support for a number of different 2D charts, and export to SVG/PNG/JPG
- SVG diagrams module - dedicated SVG renderer, with support for export to SVG/PNG/JPG
- Diagram tools
- BPMN shapes - tasks, events, pools, lanes, start, end
- Support for "click to add" edges
- Support for edge snap to targets
- Source/target markers (overlays placed at either end of an edge that the edge does not overlap)
- Rotate vertices tool
React
- Modernized API - streamlined and easier to use
- DiagramComponent
- ChartComponents
- InspectorComponent refactored to be far more simple to use
- MiniviewComponent, ControlsComponent, ExportControlsComponent and InspectorComponents can now be declared in your JSX as children of a SurfaceComponent
Angular
- Modernized API - streamlined and easier to use
- A default component is now used for nodes/groups if you do not map one in your view - helpful for rapid prototyping or UIs that dont need complex content.
- Miniview, Controls, ExportControls and Inspector components can now be declared in your template as children of a Surface component
Vue
- Modernized API - streamlined and easier to use
- Added Surface/Diagram providers, allowing for easier composition of UI
- Added injectable VisuallyJs service, exposing the Surface/Model/Diagram that is in the current context for some component.
- All starter apps are now available for Vue
Svelte
- Modernized API - streamlined and easier to use
- Added Surface/Diagram providers, allowing for easier composition of UI
- All starter apps are now available for Svelte
Miscellaneous updates
- Hierarchy layout option to align leaves on final layer
- Improved UX for the orthogonal + bezier connector editors
- Improved documentation
- New look and feel for controls, miniview and resize tools
- Full support for groups and nested groups in the SVG renderer
- SVG shapes updates - new Label shape, shapes publish properties, ShapeLibraryInspector
- Template updates - ability to use the '||' operator in attribute values. Applies when using Vanilla templates and also in the chart and shape library templating.
- Controls component "clear selection" button
- Snaplines plugin now takes rotation into account
- The
ResizingToolsPluginregisters a drag filter on the underlying Surface, meaning you no longer need to add one in your render options. - The
updateNodeandupdateGroupmethods now set the position of the vertex's DOM element if the update includesleftortop(or, for a Diagram,xory) values. Previously you had to usesetPosition(..)and thenstorePositionInModel(..) - Adhoc layouts are now run inside a transaction, and can be undone/redone.
- Added support for
cornerRadiusto Segmented connector. - Added support for
panWithMetaKeyoption to the Surface. With this set, users need to hold the meta/ctrl key in order to instigate a pan. - Added support for auto entering edge edit mode when user taps (and auto exit when they tap whitespace in the canvas)
- Miniview elements now move as their related surface element is being dragged, unless you set
dynamic:falseon the miniview.
Breaking changes
This section details the changes that will require resolution for current users of JsPlumb who are upgrading to VisuallyJs. VisuallyJs is 100% functionally backwards compatible with anything that had not been deprecated in JsPlumb.
General
- IMPORTANT: The
Sizeinterface was changed from{w:number, h:number}to{width:number, height:number}. This is a small change from a code perspective but with far-reaching effects - any part of a JsPlumb app in which you specify a size for something, be it a grid, or the size of icons in a shape library palette, or the max size for a group, etc, will need to be updated for VisuallyJs to use the new interface. We made this change to make the code more internally consistent: width/height were used by the drawing tools and are also standard for various DOM interfaces. - The default anchor is now
Continuous, where previously it wasBottom. - The concept of
Endpointhas been removed. From a visual perspective, you can replace endpoints with the newDot,RectangleandEllipseoverlays, optionally registered as markers. Orthogonalconnectors no longer support loading data in the JsPlumb 2.x format.- The
legacy-jsondatatype, in which ports are listed at the top level alongside nodes, groups and edges, is no longer supported. - The list manager, which was part of JsPlumb Community edition, was removed.
- The concept of a
data manager- an add-on that responds to changes in the data model - was removed. This functionality can be modelled, if desired, by listening to appropriate model events. - Dotted notation for left/top values in vertex backing data is no longer supported. Your left/top properties must be in the top level of the backing data for each vertex.
- Removed constant
CLASS_DRAG_SELECT_DEFEAT- it was a duplicate ofCLASS_SELECT_DEFEAT
Drag/Drop
-
SurfaceDropManagerandDropManagerhave been replaced with a new classPalette. This class has several enhancements to the previous classes:- it has a
clickmode where the user can select an item in the palette and then click on the canvas to drop it - it supports
ignoreDropOnNode, a flag indicating that the palette should just ignore nodes altogether, and whenever something is dropped on a node or hovering over a node, the palette treats it as if it is over whitespace on the canvas
- it has a
Surface
- Removed
autoExitSelectModeflag from the surface render options. To set this up now you should provide anautoExitflag to the lasso plugin. - Removed
enhancedViewflag from the surface render options. This behaviour is always switched on now. - Removed
addToDragSelectionOnSelectfrom the surface render options. What this means is that in VisuallyJs if you have one or more vertices in the current selection, they will not be dragged when some other vertex (not in the current selection) is dragged. This probably seems intuitive to you, which is why this flag has been defaulting to false and has now been removed. Use drag groups, or add all nodes you want to drag to the current selection, to drag multiple vertices. - Removed
refreshAutomaticallyflag from the surface render options. This behaviour is permanently switched on in VisuallyJs. - Removed
storePositionsInModelfrom the surface render options. This behaviour is permanently switched on in VisuallyJs.
Nodes/Groups
filterin the surfacedragOptionsis now a function.cssFilterhas been introduced to replicate whatfilterused to do.
Edges
- Edge geometry uses an object based syntax now instead of array based.
simpleEdgeStylesin render options has been moved into the newedgesoption (instead ofsimpleEdgeStyles:trueyou now need{edges:{simpleEdgeStyles:true}})propertyMappingsin render options has been moved into the newedgesoption (instead ofpropertyMappings:{...}you now need{edges:{propertyMappings:{...}}})editablePathsin render options has been moved into the newedgesoption (instead ofeditablePaths:trueyou now need{edges:{editable:true}})slightlyWonkyoption removed from Orthogonal connector
Plugins
- The
DrawingToolsPluginhas been renamed toResizingToolsPlugin, and the associated.jtk-draw-...classes have all been renamed to.vjs-resize-.... The type has changed from "drawingTools" to "resizingTools" (but its best to useResizingToolsPlugin.typein your render options instead of a string anyway) - The
ActiveFilteringPluginwas removed, replaced with anactiveFilteringoption in the render options to a surface.
Angular
- Components are prefixed with
vjs-instead ofjtk-
Vue
- Vue 2 Integration removed. Vue 2 reached EOL on December 31st 2023 and is no longer receiving new features, updates or bug fixes.
CSS
- The default stylesheet now declares
position:absolutefor.jtk-miniview(previously this wasposition:relative). - Class names are prefixed with
vjs-instead ofjtk-.
Try VisuallyJs
VisuallyJs offers an extensive list of starter apps, diagrams, charts and dashboards to quick start your development, in React, Angular, Vue, Svelte and Typescript/Javascript.
























