Label

The "position" in view box of Cartesian Coordinates

The "position" in view box of PieChart

The "position" in view box of RadialBarChart

Parent Components

Properties

  • viewBoxString | Number

    The box of viewing area, which has the shape of {x: someVal, y: someVal, width: someVal, height: someVal}, usually calculated internally.

  • formatterFunctionoptional

    The formatter function of label value which has only one parameter - the value of label.

  • valueString | Numberoptional

    The value of label, which can be specified by this props or the children of <Label />

    FORMAT:

    <Label value="any" />
  • position"top" | "left" | "right" | "bottom" | "inside" | "outside" | "insideLeft" | "insideRight" | "insideTop" | "insideBottom" | "insideTopLeft" | "insideBottomLeft" | "insideTopRight" | "insideBottomRight" | "insideStart" | "insideEnd" | "end" | "center"optional

    The position of label relative to the view box.

  • offsetNumber

    The offset to the specified "position"

    DEFAULT: 5

  • childrenString | Numberoptional

    The value of label, which can be specified by this props or the props "value"

    FORMAT:

    <Label>
      any string or number
    </Label>
            
  • contentReactElement | Functionoptional

    If set a React element, the option is the custom react element of rendering label. If set a function, the function will be called to render label content.

    FORMAT:

    <Label content={<CustomizedLabel external={external} />} />
    <Label content={renderLabel} />
  • idStringoptional

    The unique id of this component, which will be used to generate unique clip path id internally. This props is suggested to be set in SSR.