()
| 630 | } |
| 631 | |
| 632 | recolor_chart() { |
| 633 | const that = this; |
| 634 | this.update_data(); |
| 635 | this.rect_groups = this.fig.selectAll('.element_group').data(this.groups); |
| 636 | const color_scale = this.scales.color; |
| 637 | |
| 638 | this.rect_groups.nodes().forEach((d, i) => { |
| 639 | const data = that.grouped_data[that.groups[i]]; |
| 640 | d3.select(d) |
| 641 | .selectAll('.rect_element') |
| 642 | .data(data) |
| 643 | .select('rect') |
| 644 | .style('stroke', that.model.get('stroke')) |
| 645 | .style('fill', (elem: any, j) => { |
| 646 | return color_scale && elem.color !== undefined && elem.color !== null |
| 647 | ? color_scale.scale(elem.color) |
| 648 | : that.colors_map(i); |
| 649 | }); |
| 650 | }); |
| 651 | } |
| 652 | |
| 653 | update_font_style() { |
| 654 | // This is a bit awkward because we did not figure out how to get |
no test coverage detected