Skip to content
  1. API
  2. Types
  3. EdgeBadge

EdgeBadge ​

Type: object

Node badge attributes

Properties

  • color(optional) Color[="white"] Fill color of the badge.

  • image(optional) BadgeImage Image to display in the badge. Size of the image relative to the badge diameter

  • marginBottom(optional) number[=0] Margin below the badge.

  • marginToText(optional) number[=0] Margin between the badge and the text.

  • minVisibleSize(optional) number[=12] If the edge length on screen is less than this value, the badge will not be displayed

  • position(optional) EdgeBadgePosition[="center"] Position of the badge relative to the edge.

  • rotateWithEdge(optional) boolean[=false] Whether the badge text stays aligned with the edge, or to the horizontal direction.

  • scalingMethod(optional) ScalingMethod[="scaled"] Indicates if the badge size should be multiplied by the zoom when the badge is displayed.

  • size(optional) number[=1] Size of the badge

  • stroke(optional) object

    • color(optional) Color|"inherit"[="black"] Color of the badge stroke
    • scalingMethod(optional) ScalingMethod[="scaled"] Indicates if the badge width should be multiplied by the zoom when the node is displayed.
    • width(optional) PixelSize[=0] Width of the badge stroke
  • text(optional) object|TextContent If not an object, alias for text.content

    • color(optional) "inherit"|Color[="black"] Color of the badge text
    • content(optional) TextContent[=null] Text to display in the badge
    • font(optional) string[="Arial"] Font to use for the badge text
    • paddingLeft(optional) number[=0] Horizontal padding of the text inside the badge
    • paddingTop(optional) number[=0] Vertical padding of the text inside the badge
    • scale(optional) number[=0.5] Size of the text relative to the badge diameter
    • style(optional) FontStyle[="normal"] Font style (italic, bold, etc.)