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

Method update_data

js/src/GridHeatMapModel.ts:69–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 }
68
69 update_data() {
70 this.dirty = true;
71 // Handling data updates
72 const numCols = this.colors[0].length;
73
74 const flatColors = [].concat.apply(
75 [],
76 this.colors.map((x) => Array.prototype.slice.call(x, 0))
77 );
78
79 this.mark_data = flatColors.map((data, index) => {
80 const rowNum = Math.floor(index / numCols);
81 const colNum = index % numCols;
82
83 return {
84 rowNum: rowNum,
85 row: this.rows[rowNum],
86 column: this.columns[colNum],
87 columnNum: colNum,
88 color: data,
89 cellNum: index,
90 };
91 });
92 this.identifyModes();
93 this.update_domains();
94 this.dirty = false;
95 this.trigger('data_updated');
96 }
97
98 update_domains() {
99 if (!this.mark_data) {

Callers 1

initializeMethod · 0.95

Calls 2

identifyModesMethod · 0.95
update_domainsMethod · 0.95

Tested by

no test coverage detected