()
| 476 | } |
| 477 | |
| 478 | redraw_axisline() { |
| 479 | if (this.axis) { |
| 480 | this.set_axisline_domain(); |
| 481 | // We need to set the range of the axis line scale here again. |
| 482 | // Only because, if the domain has changed from a two element |
| 483 | // array to a three element one, the range of the axis has to |
| 484 | // be changed accordingly. |
| 485 | this.set_axisline_scale_range(); |
| 486 | this.axis.scale(this.axis_line_scale); |
| 487 | this.set_tick_values(); |
| 488 | |
| 489 | let transform; |
| 490 | if (this.vertical) { |
| 491 | transform = |
| 492 | 'translate(' + (this.side === 'right' ? this.bar_height : 0) + ', 0)'; |
| 493 | } else { |
| 494 | transform = |
| 495 | 'translate(0, ' + (this.side === 'top' ? 0 : this.bar_height) + ')'; |
| 496 | } |
| 497 | if (this.g_axisline) { |
| 498 | this.g_axisline.attr('transform', transform).call(this.axis); |
| 499 | } |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | set_axisline_domain() { |
| 504 | const domain = this.axis_scale.scale.domain(); |
no test coverage detected