MCPcopy Index your code
hub / github.com/bqplot/bqplot / redraw_axisline

Method redraw_axisline

js/src/ColorAxis.ts:478–501  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 4

update_displayMethod · 0.95
append_axisMethod · 0.95
rescale_axisMethod · 0.95
redraw_axisMethod · 0.95

Calls 3

set_axisline_domainMethod · 0.95
set_tick_valuesMethod · 0.80

Tested by

no test coverage detected