RayCraftDocs
v1.0.3 raycraft.dev
On this page

Diagram

Complete

Flow charts and organization charts drawn as SVG. Boxes are placed automatically in levels from their connections, or at the X and Y you give. With Editable the user drags boxes or moves them with the arrow keys. Every connection is also available as text for screen readers.

Example

Diagram control

Parameters

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
DirectionDiagramDirectionTopDown or LeftRight.
EdgesIEnumerable<DiagramEdge>DiagramEdge(from, to, text) items that link node ids.
EditableboolLets the user move boxes.
HeightDoubleMaximum height of the grid body, for example 24rem (default 28rem with VirtualScroll).
LabelstringVisible label text (charts: accessible name; IconButton: accessible name and tooltip).
LevelSpacingDoubleSpace between levels.
NodesIEnumerable<DiagramNode>DiagramNode(id, text, shape, x, y, accent) items. Shapes: Process, Decision, Data, Terminal.
NodeSpacingDoubleSpace between boxes in one level.
NodeWidthDoubleWidth of every box.
ShowDataLabelsboolWrites the value on each mark (bars, line points, pie slices).
ShowExportboolAdds buttons that save the chart as a PNG or SVG image.
ShowLegendboolShows the clickable legend.
StylestringInline style added to the root element.
ValueFormatstringNumber format for axis and tooltips, e.g. N0 or P1.
WidthDoubleSkeleton: any CSS length. Charts: drawing width in SVG units (the chart still scales to its container).

Events

EventTypeDescription
OnNodeMovedEventCallback<DiagramNodeMove>Raised with the id and new position of a moved box.

Package

Diagram is part of RayCraft Complete. Package: RayCraft.Blazor.Complete. It comes from the private RayCraft feed and needs an active license. See Getting started.