private drawCategoryLabels()

in src/chordChart.ts [802:828]


  private drawCategoryLabels(): void {
    // Multiplier to place the end point of the reference line at 0.05 * radius away from the outer edge of the chord/pie.
    let arcVal: Arc<any, DefaultArcObject> = arc()
      .innerRadius(0)
      .outerRadius(this.innerRadius);

    let outerArc: Arc<any, DefaultArcObject> = arc()
      .innerRadius(this.outerRadius)
      .outerRadius(this.outerRadius);

    if (this.settings.labels.show) {
      let labelLayout: ILabelLayout = this.getChordChartLabelLayout(outerArc);
      let filteredData: LabelEnabledDataPoint[] =
        this.getDataLabelManager().hideCollidedLabels(
          this.layout.viewportIn,
          this.data.groups,
          labelLayout,
          /* addTransform */ true
        );

      this.renderLabels(filteredData, labelLayout, true);
      this.renderLines(filteredData, arcVal, outerArc);
    } else {
      dataLabelUtils.cleanDataLabels(this.labels);
      dataLabelUtils.cleanDataLabels(this.lines, true);
    }
  }