()
| 393 | } |
| 394 | |
| 395 | set_axisline_scale_range() { |
| 396 | const range = this.vertical |
| 397 | ? [this.height - 2 * this.x_offset, 0] |
| 398 | : [0, this.width - 2 * this.x_offset]; |
| 399 | if (this.ordinal) { |
| 400 | (this.axis_line_scale as d3.ScaleBand<string>) |
| 401 | .rangeRound(range as [number, number]) |
| 402 | .padding(0.05); |
| 403 | } else { |
| 404 | const mid = this.axis_scale.model.mid; |
| 405 | if (mid === undefined || mid === null) { |
| 406 | this.axis_line_scale.range(range); |
| 407 | } else { |
| 408 | this.axis_line_scale.range([ |
| 409 | range[0], |
| 410 | (range[0] + range[1]) * 0.5, |
| 411 | range[1], |
| 412 | ]); |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | set_scales_range() { |
| 418 | //Setting the range of the color scale |
no test coverage detected