@@ -3,16 +3,12 @@ import { useDispatch, useSelector } from 'react-redux';
3
3
import { Group } from '@visx/group' ;
4
4
import { hierarchy , Tree } from '@visx/hierarchy' ;
5
5
import { LinearGradient } from '@visx/gradient' ;
6
- import { pointRadial } from 'd3-shape' ;
7
6
import LinkControls from './axLinkControls' ;
8
7
import getLinkComponent from './getAxLinkComponents' ;
9
8
import { useTooltip , useTooltipInPortal , defaultStyles } from '@visx/tooltip' ;
10
9
import ToolTipDataDisplay from './ToolTipDataDisplay' ;
11
10
import { ToolTipStyles } from '../../../FrontendTypes' ;
12
11
import { localPoint } from '@visx/event' ;
13
- import AxLegend from './axLegend' ;
14
- import { renderAxLegend } from '../../../slices/AxSlices/axLegendSlice' ;
15
- import type { RootState } from '../../../store' ;
16
12
17
13
const defaultMargin = {
18
14
top : 30 ,
@@ -76,7 +72,7 @@ export default function AxTree(props) {
76
72
} ;
77
73
78
74
const [ orientation , setOrientation ] = useState ( 'horizontal' ) ;
79
- const [ linkType , setLinkType ] = useState ( 'diagonal ' ) ;
75
+ const [ linkType , setLinkType ] = useState ( 'step ' ) ;
80
76
const [ stepPercent , setStepPercent ] = useState ( 0.0 ) ;
81
77
82
78
const innerWidth : number = totalWidth - margin . left - margin . right ;
@@ -147,7 +143,6 @@ export default function AxTree(props) {
147
143
populateNodeAxArr ( rootAxNode ) ;
148
144
149
145
// Conditionally render ax legend component (RTK)
150
- const { axLegendButtonClicked } = useSelector ( ( state : RootState ) => state . axLegend ) ;
151
146
const dispatch = useDispatch ( ) ;
152
147
153
148
return totalWidth < 10 ? null : (
@@ -161,10 +156,6 @@ export default function AxTree(props) {
161
156
setLinkType = { setLinkType }
162
157
setStepPercent = { setStepPercent }
163
158
/>
164
-
165
- < button id = 'axLegendButton' onClick = { ( ) => dispatch ( renderAxLegend ( ) ) } >
166
- Generate Ax Tree Legend
167
- </ button >
168
159
</ div >
169
160
170
161
< svg ref = { containerRef } width = { totalWidth + 0.2 * totalWidth } height = { totalHeight } >
@@ -197,7 +188,6 @@ export default function AxTree(props) {
197
188
fill = 'none'
198
189
/>
199
190
) ) }
200
- // code relating to each node in tree
201
191
{ tree . descendants ( ) . map ( ( node , key ) => {
202
192
const widthFunc = ( name ) : number => {
203
193
// returns a number that is related to the length of the name. Used for determining the node width.
@@ -424,8 +414,6 @@ export default function AxTree(props) {
424
414
</ div >
425
415
</ TooltipInPortal >
426
416
) }
427
-
428
- < div > { axLegendButtonClicked ? < AxLegend /> : '' } </ div >
429
417
</ div >
430
418
) ;
431
419
}
0 commit comments