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

Method set_ranges

js/src/Bars.ts:60–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58 }
59
60 set_ranges(): void {
61 const orient = this.model.get('orientation');
62 this.setScaleOrientation();
63 const dom = orient === 'vertical' ? 'x' : 'y';
64 const rang = orient === 'vertical' ? 'y' : 'x';
65 if (!isOrdinalScale(this.domScale)) {
66 this.domScale.setRange(
67 this.parent.padded_range(dom, this.domScale.model)
68 );
69 } else {
70 this.domScale.setRange(
71 this.parent.padded_range(dom, this.domScale.model),
72 this.model.get('padding')
73 );
74 }
75 this.rangeScale.setRange(
76 this.parent.padded_range(rang, this.rangeScale.model)
77 );
78 // x_offset is set later by the adjustOffset method
79 // This differs because it is not constant for a scale.
80 // Changes based on the data.
81 this.domOffset = 0;
82 }
83
84 set_positional_scales(): void {
85 const x_scale = this.scales.x,

Callers 2

relayoutMethod · 0.95
drawMethod · 0.95

Calls 2

setScaleOrientationMethod · 0.95
padded_rangeMethod · 0.80

Tested by

no test coverage detected