diff --git a/components/diagram/connections.md b/components/diagram/connections.md index 0a676f540..139ce21a3 100644 --- a/components/diagram/connections.md +++ b/components/diagram/connections.md @@ -126,6 +126,87 @@ Note the difference between caps and selection handles: ```` +## Connection Text + +The Diagram allows you to display text labels on Connections and control their position and offset from the Connection path. You can configure the text content, color, and precise positioning relative to the Connection. + +The text positioning is controlled by two parameters: + +* `Offset`—the distance in pixels between the label and the Connection path +* Position settings that use the following enums: + * `DiagramConnectionsContentPositionHorizontal`—`Left` or `Right` + * `DiagramConnectionsContentPositionVertical`—`Top` or `Bottom` + +To configure Connection text globally for all Connections, use the `Text`, `Color`, and `Offset` parameters of ``, and the `Horizontal` and `Vertical` parameters of ``. + +To configure the text for a specific Connection, use the `Text`, `Color`, and `Offset` parameters of ``, and the `Horizontal` and `Vertical` parameters of ``. + +>caption Setting Connection text with positioning + +````RAZOR.skip-repl + + + + + + + + + + + + + + + + + +```` + +## Tooltips + +The Diagram allows you to display tooltips when hovering over Connections. Each Connection requires explicit tooltip content configuration through the `Template` parameter. + +The available tooltip parameters are: + +* `Visible` (bool, default: `false`)—controls whether the tooltip is displayed on hover +* `Class` (string)—applies a custom CSS class to the tooltip for styling +* `Template` (RenderFragment)—defines the custom content to display in the tooltip + +>caption Configuring Connection tooltips + +````RAZOR.skip-repl + + + + + + + + + + + + + + + + + + + + + + +```` + ## Selection Handles Selection handles are the additional visual elements that appear at both ends of a Connection when it is selected (clicked). The handles appear on top of the [caps and connectors](slug:diagram-overview#diagram-elements). diff --git a/components/diagram/shapes.md b/components/diagram/shapes.md index 73aa5322e..81f9009f8 100644 --- a/components/diagram/shapes.md +++ b/components/diagram/shapes.md @@ -207,6 +207,46 @@ You can customize connectors globally or per shape. Connectors settings are part ```` +## Tooltips + +The Diagram allows you to display tooltips when hovering over Shapes. Each Shape requires explicit tooltip content configuration through the `Template` parameter. + +The available tooltip parameters are: + +* `Visible` (bool, default: `false`)—controls whether the tooltip is displayed on hover +* `Class` (string)—applies a custom CSS class to the tooltip for styling +* `Template` (RenderFragment)—defines the custom content to display in the tooltip + +>caption Configuring Shape tooltips + +````RAZOR.skip-repl + + + + + + + + + + + + + + + + + + + +```` + ## Styling The following Shape styling options are available in child tags of `` and ``: