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

Method update_data

js/src/PieModel.ts:81–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79 }
80
81 update_data() {
82 const sizes = this.get('sizes') || [];
83 const color = this.get('color') || [];
84 const labels = this.get('labels') || [];
85
86 this.mark_data = Array.prototype.map.call(sizes, (d: number, i: number) => {
87 return {
88 size: d,
89 color: color[i],
90 label: labels[i] == null ? '' : labels[i],
91 index: i,
92 };
93 });
94
95 this.updateColor();
96 this.update_domains();
97 this.trigger('data_updated');
98 }
99
100 private updateLabels() {
101 if (!this.mark_data) {

Callers 2

initializeMethod · 0.95
set_positional_scalesMethod · 0.45

Calls 2

updateColorMethod · 0.95
update_domainsMethod · 0.95

Tested by

no test coverage detected