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

Method update_domains

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

Source from the content-addressed store, hash-verified

127 }
128
129 update_domains() {
130 if (!this.mark_data) {
131 return;
132 }
133
134 const scales = this.getScales();
135
136 if (scales.x) {
137 const x =
138 scales.x.type === 'date' ? getDate(this.get('x')) : this.get('x');
139 if (!this.get('preserve_domain').x) {
140 scales.x.computeAndSetDomain([x], this.model_id + '_x');
141 } else {
142 scales.x.delDomain([], this.model_id + '_x');
143 }
144 }
145 if (scales.y) {
146 if (!this.get('preserve_domain').y) {
147 scales.y.computeAndSetDomain([this.get('y')], this.model_id + '_y');
148 } else {
149 scales.y.delDomain([], this.model_id + '_y');
150 }
151 }
152 }
153
154 get_data_dict(data, index) {
155 return data.data;

Callers 3

initializeMethod · 0.95
update_dataMethod · 0.95
updateTypeMethod · 0.45

Calls 2

getDateFunction · 0.90
getScalesMethod · 0.45

Tested by

no test coverage detected