Release 1.2.0
This release focuses on a few main things:
Hooks and Reactivity
We've updated each of our integrations to be more reactive - the React hooks, for instance, now return reactive state instead of Promises and the Angular service exposes its various members as signals, instead of getters with callbacks. Additionally, we've added a useVisuallyJsUpdate() hook to each of our integrations, allowing you to easily extract a dynamically updating value from the underlying model.
Inspectors
Our Vue and Svelte inspectors have been updated to interoperate seamlessly with a piece of reactive state, cutting down on the amount of boilerplate you're required to write
Starter apps
Each of our library integrations - Vue, React, Svelte and Angular - offers the same full list of starter apps, and all of our starter apps have been updated to take advantage of the many updates 1.2.0 has to offer.
Changelog
General updates
- Circular layout has new
centerContentoption, to avoid placing nodes in negative space (useful when used inside a Group in particular) - New config
groupPropertyadded to model options. You can set the name of the property that identifies group membership in your node/group data, if the default value ofgroupclashes with your dataset. - Added
SelectionGeneratortype, defining thegeneratorfunction that can be used to fill aVisuallyJsSelection - Updated transaction handling to ensure the
transaction(...)method could be nested cleanly - Added functionality to the
Palettein "tap" mode where you can tap an item again to exit the drag (previously you'd have to press Escape)
React
dataandurlare now reactive props in the ReactSurfaceComponent. A small but very powerful change, allowing much greater composability of theSurfaceComponentin your apps- Added new React
PaperComponent, which functions as a static version of a surface - no pan/zoom or dragging, and the content is zoomed to fit the viewport at all times. - Added new
useVisuallyJsUpdatehook. This hook lets you respond to updates in the underlying model, and is handy for such use cases as components which display information about the current state of the model. - (breaking) The
useZoom(),useVisuallyJsModel()anduseDiagram()React hooks now return a reactive state object instead of a Promise.
Angular
- Added new
useVisuallyJsUpdatehook. This hook lets you respond to updates in the underlying model, and is handy for such use cases as components which display information about the current state of the model. - Added new
useZoomhook, providing access to a signal containing the current zoom for the UI in context. - Converted the
VisuallyJsServiceto expose model/surface/paper/diagram as signals, and deprecated the previous callback approach to accessing these members. - Updated the
Ganttstarter app to have feature parity with the React Gantt
Svelte
- Added new
useVisuallyJsUpdatehook. This hook lets you respond to updates in the underlying model, and is handy for such use cases as components which display information about the current state of the model. - Added new
NetworkInfrastructureandSupplyChainstarter apps. These are clones of the same apps that previously only existed for React/Angular, demonstrating how to build integrated dashboards with various VisuallyJs components sharing a single model. - Added
BPMNstarter app - Updated the
Ganttstarter app to have feature parity with the React Gantt - Updated all of the chart components to source their data from a model in scope, when data/url not provided
- Replaced all usages of
<slot></slot>elements with the modern{@render children?.()}syntax - Updated
InspectorComponentto optionally take a 2-way state object defining the current selection. This reduces the amount of boilerplate code required to use the inspector. - Updated the
SankeyChartComponentto set thepivotproperty to be reactive - Added
Mindmapstarter app - (breaking) The
useZoom()hook no longer takesuias a prop; it finds the UI from the context
Vue
- Added new
useVisuallyJsUpdatecomposable - Updated the
Ganttstarter app to have feature parity with the React Gantt - Updated
InspectorComponentto support passing in av-model, which is a reactive object that references the current selected object. Using this, you can do away with the need forrefreshandrenderEmptyContainerfunctions (and that approach is now deprecated) - Added
BPMNstarter app - Added
useSurface,usePaperanduseDiagramcomposables, for access to the UI in scope - (breaking) Updated
useZoomto not take auias argument, instead resolving the UI from the context - Added
ERDstarter app - an entity relationship diagram - Added
Mindmapstarter app - Added new
NetworkInfrastructurestarter app
Breaking
- The
useZoom(),useVisuallyJsModel()anduseDiagram()React hooks now return a reactive state object instead of a Promise. - The
useZoom()hook in the Svelte integration no longer takesuias a prop; it finds the UI from the context - The
useZoom()composable in the Vue integration no longer takes auias argument, instead resolving the UI from the context
Deprecated
- The
getModel,getSurface,getPaper,getInspectorandgetDiagramsmethods of the AngularVisuallyJsServiceare deprecated. Use the signals based approach instead. - The
refreshandrenderEmptyContainerfunctions in theInspectorComponentfor both the Vue and Svelte integrations are deprecated; see above for alternatives.
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.
























