@@ -5,7 +5,7 @@ async function drawNodes(nodes) {
55 . data ( nodes )
66 . enter ( )
77 . append ( "svg" )
8- . attr ( 'width' , 600 )
8+ . attr ( 'width' , 1200 )
99 . attr ( 'height' , d => {
1010 const rowCount = Math . ceil ( d . instances . length / 24 ) ;
1111 const lowestY = ( rowCount - 1 ) * 25 + 40 ;
@@ -14,8 +14,8 @@ async function drawNodes(nodes) {
1414
1515 section . append ( 'text' )
1616 . text ( d => d . class_label )
17- . attr ( 'x' , 0 ) . attr ( 'y' , 30 )
18- . attr ( 'class' , 'regular_text ' )
17+ . attr ( 'x' , 300 ) . attr ( 'y' , 32 )
18+ . attr ( 'class' , 'type_labels ' )
1919
2020 section . selectAll ( "circle" )
2121 . data ( d => d . instances )
@@ -24,7 +24,7 @@ async function drawNodes(nodes) {
2424 . text ( d => d . entity_label )
2525 . attr ( 'class' , 'regular_text circle_labels' )
2626 . attr ( 'id' , ( d , i ) => 'text_' + d . entity_link . split ( '/' ) . pop ( ) )
27- . attr ( "x" , ( d , i ) => ( ( i % 24 ) * 25 ) + 11 + 15 )
27+ . attr ( "x" , ( d , i ) => ( ( i % 24 ) * 25 ) + 11 + 15 + 300 )
2828 . attr ( "y" , ( d , i ) => ( Math . floor ( i / 24 ) * 25 ) + 60 + 5 )
2929 . attr ( "opacity" , 0 )
3030
@@ -35,19 +35,21 @@ async function drawNodes(nodes) {
3535 . attr ( 'class' , 'round' )
3636 . attr ( 'id' , ( d , i ) => d . entity_link . split ( '/' ) . pop ( ) )
3737 . attr ( "r" , 10 )
38- . attr ( "cx" , ( d , i ) => ( ( i % 24 ) * 25 ) + 11 )
38+ . attr ( "cx" , ( d , i ) => ( ( i % 24 ) * 25 ) + 11 + 300 )
3939 . attr ( "cy" , ( d , i ) => ( Math . floor ( i / 24 ) * 25 ) + 60 )
4040 . attr ( 'fill' , "#dddddd" )
4141 . attr ( 'stroke' , "black" )
4242 . attr ( 'stroke-width' , '1px' )
4343 . attr ( 'opacity' , 0.8 )
4444 . on ( 'mouseover' , function ( k , d ) {
4545 d3 . selectAll ( '.round' ) . transition ( ) . duration ( 200 ) . attr ( 'opacity' , 0.1 ) ;
46+ d3 . selectAll ( '.type_labels' ) . transition ( ) . duration ( 200 ) . attr ( 'opacity' , 0.1 ) ;
4647 d3 . select ( this ) . transition ( ) . duration ( 200 ) . attr ( 'opacity' , 0.8 ) ; ;
4748 d3 . select ( '#' + 'text_' + d . entity_link . split ( '/' ) . pop ( ) ) . transition ( ) . duration ( 200 ) . attr ( 'opacity' , 1 )
4849 } )
4950 . on ( 'mouseout' , function ( k , d ) {
5051 d3 . selectAll ( '.round' ) . transition ( ) . duration ( 200 ) . attr ( 'opacity' , 0.8 ) ;
52+ d3 . selectAll ( '.type_labels' ) . transition ( ) . duration ( 200 ) . attr ( 'opacity' , 0.8 ) ;
5153 d3 . selectAll ( '.circle_labels' ) . transition ( ) . duration ( 200 ) . attr ( 'opacity' , 0 ) ;
5254 } )
5355 . on ( 'click' , function ( k , d ) {
0 commit comments