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

Method update_offset_scale_domain

js/src/Axis.ts:265–281  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263 }
264
265 update_offset_scale_domain() {
266 // Sets the domain (range of input values) of the offset scale
267
268 const is_vertical = ['left', 'right'].includes(this.model.get('side'));
269
270 if (this.offset_scale) {
271 const initial_range = !is_vertical
272 ? this.parent.padded_range('y', this.offset_scale.model)
273 : this.parent.padded_range('x', this.offset_scale.model);
274
275 const target_range = !is_vertical
276 ? this.parent.range('y')
277 : this.parent.range('x');
278
279 this.offset_scale.expandDomain(initial_range, target_range);
280 }
281 }
282
283 generate_tick_formatter() {
284 const default_formatter = this.generate_default_tick_formatter();

Callers 3

update_offsetMethod · 0.95
update_scalesMethod · 0.95
get_offset_promiseMethod · 0.95

Calls 2

padded_rangeMethod · 0.80
rangeMethod · 0.80

Tested by

no test coverage detected