Search results

DataLabelSettings API in React Pivot Grid API component

Allows to configure the data label with different settings such as name, fill color, opacity, rotation angle, border, marging, etc in the chart.

Properties

alignment

Alignment

Allows to set the alignment for data Label. They are,

  • Near: Aligns the label to the left of the point.
  • Center: Aligns the label to the center of the point.
  • Far: Aligns the label to the right of the point.

Defaults to ‘Center’

angle

number

Allows to specify the rotation angle to data label.

Defaults to 0

border

PivotChartBorderModel

Allows option for customizing the border lines.

enableRotation

boolean

Allows to set whether rotation to data label is enable or not.

Defaults to false

fill

string

Allows to set the background color of the data label accepts value in hex and rgba as a valid CSS color string.

Defaults to ‘transparent’

font

PivotChartFontModel

Allows option for customizing the data label text.

margin

PivotChartMarginModel

Allows customize the margin to the data label.

name

string

Allows to set the data source field that contains the data label value.

Defaults to null

opacity

number

Allows to set the opacity to the background.

Defaults to 1

position

string

Allows to specify the position of the data label. They are,

  • Outer: Positions the label outside the point.
  • top: Positions the label on top of the point.
  • Bottom: Positions the label at the bottom of the point.
  • Middle: Positions the label to the middle of the point.
  • Auto: Positions the label based on series.

Defaults to ‘Auto’

rx

number

Allows to set the roundedCornerX for the data label. It requires border values not to be null.

Defaults to 5

ry

number

Allows to set the roundedCornerY for the data label. It requires border values not to be null.

Defaults to 5

template

string

Allows custom template to show the data label. Use ${point.x} and ${point.y} as a placeholder text to display the corresponding data point.

Defaults to null

visible

boolean

Allows to set the visibility of data label to the series renders.

Defaults to false