HelpBot Assistant

How can I help you?

SankeyLegendSettingsModel

16 Mar 20261 minute to read

Interface for a class SankeyLegendSettings

Properties

background string

Background color of the legend.

border BorderModel

Options for customizing the border of the legend.

enableHighlight boolean

Enables or disables highlighting of legend items on interaction.

height string

Specifies the height of the legend.

isInversed boolean

Specifies whether the legend layout should be inverted.

itemPadding number

Padding between legend items.

location LocationModel

Specifies the location of the legend relative to the Sankey chart.
If x is 20, the legend moves 20 pixels to the right of the Sankey chart.

Note that the position must be set to Custom for this feature to work.
```html

```typescript
let sankey: Sankey = new Sankey({
...
  legendSettings: {
          visible: true,
          position: 'Custom',
          location: { x: 100, y: 150 }
  }
...
});
sankey.appendTo('#Sankey');

margin MarginModel

Options to configure the margins around the component.

opacity number

Opacity of the legend container.

padding number

Padding around the legend container.

position LegendPosition

Specifies the position of the legend in the chart.

reverse boolean

Specifies whether the legend items should be displayed in reverse order.

shapeHeight number

Size of the legend shape (icon).

shapePadding number

Padding between the legend shape and its text.

shapeWidth number

Size of the legend shape (icon).

textStyle FontModel

Defines the text styling options applied to legend labels in the Sankey diagram.

title string

Title text for the legend.

titleStyle FontModel

Defines the font styling used for rendering the legend title in the Sankey diagram.

visible boolean

Enables or disables the legend display.

width string

Specifies the width of the legend.