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

Method create_axis

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

Source from the content-addressed store, hash-verified

69 }
70
71 create_axis(): void {
72 this.side = this.model.get('side');
73 this.vertical = ['left', 'right'].includes(this.model.get('side'));
74 if (this.vertical) {
75 this.axis =
76 this.side === 'right'
77 ? d3.axisRight(
78 this.axis_scale.scale as d3.ScaleLinear<
79 any,
80 any
81 > as d3.AxisScale<d3.AxisDomain>
82 )
83 : d3.axisLeft(
84 this.axis_scale.scale as d3.ScaleLinear<
85 any,
86 any
87 > as d3.AxisScale<d3.AxisDomain>
88 );
89 } else {
90 this.axis =
91 this.side === 'top'
92 ? d3.axisTop(
93 this.axis_scale.scale as d3.ScaleLinear<
94 any,
95 any
96 > as d3.AxisScale<d3.AxisDomain>
97 )
98 : d3.axisBottom(
99 this.axis_scale.scale as d3.ScaleLinear<
100 any,
101 any
102 > as d3.AxisScale<d3.AxisDomain>
103 );
104 }
105 }
106
107 update_display() {
108 this.g_axisline.remove();

Callers 2

renderMethod · 0.95
update_displayMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected