Skip to main content

Release 1.1.2

· 3 min read
sporritt

In release 1.1.1 we added support for rotating label and custom overlays to match their connectors, which we thought was a cool feature. After configuring it in our Flowchart builder starter app, though, we decided to make a small update.

Consider this screenshot and have a look at the labels:

Rotating labels

...they are all faithfully rotated to match the slope of the connector at the points at which they are located, but that results in some of them being upside down - which is not perhaps the best UX. So, we've updated the label rotation code to support the concept of "strict" vs "legible" rotation. If you just set labelsRotatable:true you will now get "legible" rotation - the label is never rotated so that it is upside down, or difficult to read. In practice this means that any rotation between 90 degrees and 270 degrees is flipped:


import { DiagramComponent } from "@visuallyjs/browser-ui-react"
import "@visuallyjs/browser-ui/css/visuallyjs.css";

export default function App() {

const data = ...

const options = {
edges: {
showLabels: true,
labelsRotatable: true,
targetMarker: "PlainArrow"
}
}

return <div style={{width:"100%", height:"500px"}}>
<DiagramComponent data={data} options={options}/>
</div>
}

Contrast the above with what you get when you specify "strict" rotation:


import { DiagramComponent } from "@visuallyjs/browser-ui-react"
import "@visuallyjs/browser-ui/css/visuallyjs.css";

export default function App() {

const data = ...

const options = {
edges: {
showLabels: true,
labelsRotatable: "strict",
targetMarker: "PlainArrow"
}
}

return <div style={{width:"100%", height:"500px"}}>
<DiagramComponent data={data} options={options}/>
</div>
}

These changes have, of course, also been applied to the edges defined in a view for an App. First we see the default - "legible" - setting:

import { newInstance } from "@visuallyjs/browser-ui"

const model = newInstance()

const surface = model.render({
view: {
edges: {
default: {
label: "{{label}}",
labelsRotatable: true,
targetMarker: "PlainArrow"
}
}
}
})

and this is how it looks when you specify "strict" rotation:

import { newInstance } from "@visuallyjs/browser-ui"

const model = newInstance()

const surface = model.render({
view: {
edges: {
default: {
label: "{{label}}",
labelsRotatable: "strict",
targetMarker: "PlainArrow"
}
}
}
})


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.

When you've reached the limits with SvelteFlow, VisuallyJs has what you need
Call Flow
Use VisuallyJs to build a visual Call Flow editor
VisuallyJs - JavaScript and Typescript diagramming library that fuels exceptional UIs
AI Agent Builder
Use VisuallyJs to create an advanced AI agent builder
When you've reached the limits with ReactFlow, VisuallyJs has what you need
Chatbot
Use VisuallyJs to build a Chatbot editor, with actions, messages, input and choices
VisuallyJs - fully featured alternative to ReactFlow and ngDiagram
Flowchart
Fully featured flowchart builder including support for custom shapes, edge routing to avoid vertices, shape resize/rotate, SVG/PNG/JPG export and more
VisuallyJs - build diagrams and rich visual UIs fast
BPMN
BPMN editor for modelling the steps of a business process. Pools, lanes, and a full set of task, event and gateway types
VisuallyJs - leading alternative to GoJS, JointJS, ReactFlow and SvelteFlow
ERD
ERD editor for modelling the steps of a business process
VisuallyJs - fully featured alternative to ReactFlow and ngDiagram
Gantt
Interactive Gantt chart featuring tasks, task groups and milestones
VisuallyJs - callflow builders, sankey charts, database schemas, ERD diagrams and more
Kanban
Fully featured Kanban board. Drag items between columns and use the inspector to update items and columns
VisuallyJs - industry standard diagramming and rich visual UI Javascript and Typescript library
Database Schema
Database Schema builder with support for tables, views, multiple columns types, and column relationships
VisuallyJs - fully featured alternative to ReactFlow and ngDiagram
Org Chart
Uses the classic org chart layout and provides an inspector from which the user can navigate around
VisuallyJs - flowcharts, AI Agent builders, chatbots, bar charts, decision trees, mindmaps, org charts and more
Circuit Diagram
Fully featured starter app containing a circuit diagram builder
VisuallyJs - fully featured alternative to ReactFlow and ngDiagram
Scada/HMI
Professional and modern Scada/HMI application with fluid, heating/cooling & instrumentation shapes, adhering to the HMI ISA-101 Design Standard
When you've reached the limits with ReactFlow, VisuallyJs has what you need
Mindmap
The mindmap builder highlights several advanced features, such as custom layouts, parsers and exporters
VisuallyJs - JavaScript and Typescript diagramming library that fuels exceptional UIs
Neighbourhood Views
Demonstrates how to include multiple views of a dataset on one page
When you've reached the limits with ngDiagram, VisuallyJs has what you need
Logic Gates
Fully featured starter app containing a logic gates diagram builder
VisuallyJs - flowcharts, AI Agent builders, chatbots, bar charts, decision trees, mindmaps, org charts and more
Template
Basic starter app demonstrating how to setup VisuallyJs and its main features
VisuallyJs - fully featured alternative to ReactFlow and ngDiagram
Area & Line charts
Use VisuallyJs to create area and line charts
VisuallyJs - flowcharts, AI Agent builders, chatbots, bar charts, decision trees, mindmaps, org charts and more
Bar & Column charts
Multiple series, stacked, grouped, pivoted, and much more
VisuallyJs - JavaScript and Typescript diagramming library that fuels exceptional UIs
Scatter & Bubble charts
Circle, rectangle, triangle or custom markers, multiple series, fully customizable
VisuallyJs - fully featured alternative to ReactFlow and ngDiagram
Sankey chart
Use VisuallyJs to create a professional Sankey chart, with support for pivoting
VisuallyJs - fully featured alternative to ReactFlow and ngDiagram
Supply Chain Analyzer
Dashboard for managing and analyzing supply chains
VisuallyJs - leading alternative to GoJS, JointJS, ReactFlow and SvelteFlow
Network Infrastructure
Combine a network management diagram with charts showing projected cost and resource usage
VisuallyJs - leading alternative to GoJS, JointJS, ReactFlow and SvelteFlow
Scrolling Lists
Use the ListManager plugin to manage scrolling lists: as elements are scrolled out of the view, their edges are moved to the list container
When you've reached the limits with ngDiagram, VisuallyJs has what you need
FIFA World Cup
A visualizer for the FIFA World cup - group stages, team journeys and a tournament view.
VisuallyJs - effortlessly build professional node based UIs with Javascript, Typescript, React, Svelte, Angular and Vue
Fault Tree Analysis
Combines a fault tree analysis diagram with charts showing risk and list of cut sets