()
| 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(); |
no outgoing calls
no test coverage detected