Type alias SpiderScaleLabelStrategy

SpiderScaleLabelStrategy: ((labelInfo: SpiderScaleLabelPosition & {
    axis: SpiderAxis;
    axisAngle: number;
    axisCount: number;
    axisIndex: number;
    axisTag: string;
    chart: SpiderChart;
    labelPadding: number;
    webCount: number;
    webIndex: number;
}) => Partial<SpiderScaleLabelPosition> | undefined)

Type declaration

    • (labelInfo: SpiderScaleLabelPosition & {
          axis: SpiderAxis;
          axisAngle: number;
          axisCount: number;
          axisIndex: number;
          axisTag: string;
          chart: SpiderChart;
          labelPadding: number;
          webCount: number;
          webIndex: number;
      }): Partial<SpiderScaleLabelPosition> | undefined
    • Type of a scale label strategy function. Defines how scale labels are aligned.

      Supported property types:

      • alignmentX - Alignment X [-1, 1], where -1 is left and 1 is right extreme
      • alignmentY - Alignment Y [-1, 1], where -1 is bottom and 1 is top extreme
      • paddingX - Padding in X direction as pixels
      • paddingY - Padding in Y direction as pixels
      • chart - The SpiderChart instance used in the chart.
      • axis - The SpiderAxis instance representing the axis.
      • axisIndex - Index of the axis. 0 is always directly up.
      • axisCount - Total number of axes in the chart.
      • axisTag - Name of the axis.
      • axisAngle - Angle of the axis in radians.
      • webIndex - Index of the web. 0 is always the outer-edge of the spider.
      • webCount - Total number of webs in the chart.
      • labelPadding - Padding of the label as set in the chart.

      Returns

      SpiderScaleLabelPosition (modified position object) or undefined to not display the label.

      Parameters

      • labelInfo: SpiderScaleLabelPosition & {
            axis: SpiderAxis;
            axisAngle: number;
            axisCount: number;
            axisIndex: number;
            axisTag: string;
            chart: SpiderChart;
            labelPadding: number;
            webCount: number;
            webIndex: number;
        }

        Object containing label position and additional chart, axis, and label information.

      Returns Partial<SpiderScaleLabelPosition> | undefined