MCPcopy Create free account
hub / github.com/bqplot/bqplot / set_scales_range

Method set_scales_range

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

Source from the content-addressed store, hash-verified

330 }
331
332 set_scales_range() {
333 const is_vertical = ['left', 'right'].includes(this.model.get('side'));
334
335 this.axis_scale.setRange(is_vertical ? [this.height, 0] : [0, this.width]);
336 if (this.offset_scale) {
337 this.offset_scale.setRange(
338 is_vertical ? [0, this.width] : [this.height, 0]
339 );
340 }
341 }
342
343 create_axis() {
344 // Creates the initial D3 axis and sets it on this.axis

Callers 4

renderMethod · 0.95
update_offsetMethod · 0.95
update_displayMethod · 0.95
rescale_axisMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected