Skip to content

Latest commit

 

History

History
42 lines (37 loc) · 4.39 KB

label.en.md

File metadata and controls

42 lines (37 loc) · 4.39 KB

| Properties | Type | Description | | ---------- | ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | --------- | | type | string | When a user uses a custom label type, need to declare the specific type, otherwise you will use the default label type rendering (pie chart label support inner | outer | spiders) | | offset | number | label offset | | offsetX | number | The offset distance of the label from the data point in the X direction | | offsetY | number | The offset distance of the label from the data point in the Y direction | | content | string | IGroup | IShape | GeometryLabelContentCallback | Text content that is displayed, if not declared, is displayed according to the value of the first field participating in the mapping | | style | ShapeAttrs | Label text graphic property style | | autoRotate | string | Whether to rotate automatically, default true | | rotate | number | Text rotation Angle | | labelLine | null | boolean | LabelLineCfg | Used to set the style property of the text connector. NULL indicates that it is not displayed. | | labelEmit | boolean | Only applies to text in polar coordinates, indicating whether the text is radially displayed according to the Angle. True means on and false means off | | layout | 'overlap' | 'fixedOverlap' | 'limitInShape' | Text layout type, support a variety of layout function combination. | | position | 'top' | 'bottom' | 'middle' | 'left' | 'right' | Specifies the position of the current Label relative to the current graphic | | animate | boolean | AnimateOption | Animation configuration. | | formatter | Function | Format function | | autoHide | boolean | Whether to hide it automatically, default to false |

Types of LabelLineCfg are as follow: (Go ShapeAttrs see more details about ShapeAttrs)

type LabelLineCfg = {
  style?: ShapeAttrs;
}

Example code:

{
  label: {
    style: {
      fill: 'red',
      opacity: 0.6,
      fontSize: 24
    },
    rotate: true
  }
}