MCPcopy Create free account
hub / github.com/bqplot/bqplot / rescale_axis

Method rescale_axis

js/src/Axis.ts:679–698  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 2

create_listenersMethod · 0.95
parent_margin_updatedMethod · 0.95

Calls 11

set_scales_rangeMethod · 0.95
update_axis_domainMethod · 0.95
update_scalesMethod · 0.95
get_axis_transformMethod · 0.95
get_label_attributesMethod · 0.95
get_text_stylingMethod · 0.95
set_tick_valuesMethod · 0.95
update_grid_linesMethod · 0.95
apply_tick_stylingMethod · 0.95
applyAttrsFunction · 0.90
applyStylesFunction · 0.90

Tested by

no test coverage detected