| 609 | } |
| 610 | |
| 611 | draw_group_names() { |
| 612 | // Get all the bounding rects of the paths around each of the |
| 613 | // sectors. Get their client bounding rect. |
| 614 | const paths = this.svg |
| 615 | .selectAll('.bounding_path') |
| 616 | .nodes() as SVGPathElement[]; |
| 617 | const clientRects = paths.map((path) => { |
| 618 | return path.getBoundingClientRect(); |
| 619 | }); |
| 620 | const text_elements = this.fig_names |
| 621 | .selectAll('.names_object') |
| 622 | .data(clientRects); |
| 623 | text_elements |
| 624 | .attr('width', (d) => { |
| 625 | return d.width; |
| 626 | }) |
| 627 | .attr('height', (d) => { |
| 628 | return d.height; |
| 629 | }); |
| 630 | } |
| 631 | |
| 632 | recolor_chart() { |
| 633 | const that = this; |