()
| 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, |
no test coverage detected