MCPcopy Index your code
hub / github.com/bqplot/bqplot / recolor_chart

Method recolor_chart

js/src/MarketMap.ts:632–651  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 2

update_map_colorsMethod · 0.95
colors_updatedMethod · 0.95

Calls 1

update_dataMethod · 0.95

Tested by

no test coverage detected