← 返回首页
javascript/samples/ShapeAndBackgroundAnnotations.md at master · BasicPrimitives/javascript · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Latest commit

 

History

History
19 lines (15 loc) · 1.46 KB
 master
Top

File metadata and controls

  • Preview
  • Code
  • Blame
19 lines (15 loc) · 1.46 KB

Shape & Background Annotations

Shape

Diagrams support on-screen annotations for visualization of non - hierarchical relations between nodes. Components use SVG elements to render geometrical figures. If you need some specific custom shapes, you have to make changes to the source code or use images and custom items templates. Shape annotation supports the following figures:

  • Rounded Rectangle
  • Oval
  • Triangle
  • Cross Out
  • Circle
  • Rhombus

If you define multiple nodes, then annotation draws one large shape on top of them. If you need numerous individual figures for a list of nodes, you have to create shape annotation for every node. If you don't define background or borderline color, then they are not drawn. Annotation can render a text label on the side of the geometrical figure.

Background Annotation

This visual is a common background area having borderline and fill color. When we render the same background annotation for multiple items, control automatically blends them into a single continuous shape. Increase background offset around nodes if they don't merge. Merging annotations improves visualization and minimizes visual clutter in the diagram. Use includeChildren option to expand the background around the item down to all of its descendants.

JavaScript PDFKit

Footer

© 2026 GitHub, Inc.