()
| 677 | } |
| 678 | |
| 679 | rescale_axis() { |
| 680 | //function to be called when the range of the axis has been updated |
| 681 | //or the axis has to be repositioned. |
| 682 | this.set_scales_range(); |
| 683 | //The following calls to update domains are made as the domain |
| 684 | //of the axis scale needs to be recalculated as the expansion due |
| 685 | //to the padding depends on the size of the canvas because of the |
| 686 | //presence of fixed pixel padding for the bounding box. |
| 687 | this.update_axis_domain(); |
| 688 | this.update_scales(); |
| 689 | this.g_axisline.attr('transform', this.get_axis_transform()); |
| 690 | this.g_axisline.call(this.axis); |
| 691 | const axisLabel = this.g_axisline.select('text.axislabel'); |
| 692 | applyAttrs(axisLabel, this.get_label_attributes()); |
| 693 | applyStyles(axisLabel, this.get_text_styling()); |
| 694 | // TODO: what follows is currently part of redraw_axisline |
| 695 | this.set_tick_values(); |
| 696 | this.update_grid_lines(); |
| 697 | this.apply_tick_styling(); |
| 698 | } |
| 699 | |
| 700 | update_axis_domain() { |
| 701 | const initial_range = this.vertical |
no test coverage detected