@@ -3,16 +3,12 @@ import { useDispatch, useSelector } from 'react-redux';
33import { Group } from '@visx/group' ;
44import { hierarchy , Tree } from '@visx/hierarchy' ;
55import { LinearGradient } from '@visx/gradient' ;
6- import { pointRadial } from 'd3-shape' ;
76import LinkControls from './axLinkControls' ;
87import getLinkComponent from './getAxLinkComponents' ;
98import { useTooltip , useTooltipInPortal , defaultStyles } from '@visx/tooltip' ;
109import ToolTipDataDisplay from './ToolTipDataDisplay' ;
1110import { ToolTipStyles } from '../../../FrontendTypes' ;
1211import { localPoint } from '@visx/event' ;
13- import AxLegend from './axLegend' ;
14- import { renderAxLegend } from '../../../slices/AxSlices/axLegendSlice' ;
15- import type { RootState } from '../../../store' ;
1612
1713const defaultMargin = {
1814 top : 30 ,
@@ -76,7 +72,7 @@ export default function AxTree(props) {
7672 } ;
7773
7874 const [ orientation , setOrientation ] = useState ( 'horizontal' ) ;
79- const [ linkType , setLinkType ] = useState ( 'diagonal ' ) ;
75+ const [ linkType , setLinkType ] = useState ( 'step ' ) ;
8076 const [ stepPercent , setStepPercent ] = useState ( 0.0 ) ;
8177
8278 const innerWidth : number = totalWidth - margin . left - margin . right ;
@@ -147,7 +143,6 @@ export default function AxTree(props) {
147143 populateNodeAxArr ( rootAxNode ) ;
148144
149145 // Conditionally render ax legend component (RTK)
150- const { axLegendButtonClicked } = useSelector ( ( state : RootState ) => state . axLegend ) ;
151146 const dispatch = useDispatch ( ) ;
152147
153148 return totalWidth < 10 ? null : (
@@ -161,10 +156,6 @@ export default function AxTree(props) {
161156 setLinkType = { setLinkType }
162157 setStepPercent = { setStepPercent }
163158 />
164-
165- < button id = 'axLegendButton' onClick = { ( ) => dispatch ( renderAxLegend ( ) ) } >
166- Generate Ax Tree Legend
167- </ button >
168159 </ div >
169160
170161 < svg ref = { containerRef } width = { totalWidth + 0.2 * totalWidth } height = { totalHeight } >
@@ -197,7 +188,6 @@ export default function AxTree(props) {
197188 fill = 'none'
198189 />
199190 ) ) }
200- // code relating to each node in tree
201191 { tree . descendants ( ) . map ( ( node , key ) => {
202192 const widthFunc = ( name ) : number => {
203193 // 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) {
424414 </ div >
425415 </ TooltipInPortal >
426416 ) }
427-
428- < div > { axLegendButtonClicked ? < AxLegend /> : '' } </ div >
429417 </ div >
430418 ) ;
431419}
0 commit comments