Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 1.07 KB

Labels.md

File metadata and controls

38 lines (32 loc) · 1.07 KB

Labels

Minimized items labels

Chart supports rendering labels for minimized dotted items. The following properties on config used to control labels rendering:

  • showLabels
  • labelSize
  • labelOffset
  • labelOrientation
  • labelPlacement

User can customize labels per individual item with ItemConfig properties:

  • label
  • showLabel
import { OrgDiagram } from basicprimitivesreact;
import { Enabled } from basicprimitives;
<OrgDiagram config={
    items: [
        {
            id: 0,
            parent: null,
            title: "James Smith",
            description: "VP, Public Sector",
            label: "James Smith",
            showLabel: Enabled.True
        }
    ]
  }
/>

React

Adding labels to the item template

If we need to draw labels for visible items, we can add them to templates. The following example demonstrates how to add an extra property "percent" to the item and render it a label over the item connection line.

React