@@ -404,31 +404,31 @@ export function generateDotString(
404404 const totalCount = totalNodeEdges [ currentStep ] || 0 ;
405405 const color = calculateColor ( rank , totalSteps ) ;
406406 const edgeColor = calculateEdgeColors ( outcomes ) ;
407- const nodeTooltip = `Rank:\n\t\t ${ rank + 1 } \nColor:\n\t\t ${ color } \nTotal Students:\n\t\t${ totalNodeEdges [ currentStep ] || 0 } ` ;
407+ const nodeTooltip = `Rank:\n\t\t${ rank + 1 } \nColor:\n\t\t${ color } \nTotal Students:\n\t\t${ totalNodeEdges [ currentStep ] || 0 } ` ;
408408
409409 dotString += ` "${ currentStep } " [rank=${ rank + 1 } , style=filled, fillcolor="${ color } ", tooltip="${ nodeTooltip } "];\n` ;
410410
411411 if ( edgeCount > minVisits ) {
412412 let tooltip = `${ currentStep } to ${ nextStep } \n\n`
413413 + `Student Statistics:\n`
414414 + `- Total Students at ${ currentStep } : \n\t\t${ totalCount } \n`
415- + `- Unique Students on this path: \n\t\t ${ edgeCount } \n`
416- + `- Total Edge Visits: \n\t\t ${ visits } \n` ;
415+ + `- Unique Students on this path: \n\t\t${ edgeCount } \n`
416+ + `- Total Edge Visits: \n\t\t${ visits } \n` ;
417417
418418 // Add repeat visit information for all edges
419419 if ( repeatVisits [ edgeKey ] ) {
420420 const repeatCounts = Object . values ( repeatVisits [ edgeKey ] ) ;
421421 const studentsWithRepeats = repeatCounts . filter ( count => count > 1 ) . length ;
422422 const maxRepeats = Math . max ( ...repeatCounts ) ;
423- tooltip += `- Students who repeated this path: \n\t\t ${ studentsWithRepeats } \n`
424- + `- Maximum visits by a student: \n\t\t ${ maxRepeats } \n` ;
423+ tooltip += `- Students who repeated this path: \n\t\t${ studentsWithRepeats } \n`
424+ + `- Maximum visits by a student: \n\t\t${ maxRepeats } \n` ;
425425 }
426426
427427 tooltip += `\nPath Statistics:\n`
428428 + `- Ratio: \n\t\t${ ( ( ratioEdges [ edgeKey ] || 0 ) * 100 ) . toFixed ( 2 ) } % of students at ${ currentStep } go to ${ nextStep } \n`
429- + `- Outcomes: \n\t\t ${ Object . entries ( outcomes ) . map ( ( [ outcome , count ] ) => `${ outcome } : ${ count } ` ) . join ( '\n\t\t ' ) } \n`
429+ + `- Outcomes: \n\t\t${ Object . entries ( outcomes ) . map ( ( [ outcome , count ] ) => `${ outcome } : ${ count } ` ) . join ( '\n\t\t' ) } \n`
430430 + `\nVisual Properties:\n`
431- + `- Color: \n\t\t Hex : ${ color } \n` ;
431+ + `- Color: \n\t\tHex : ${ color } \n` ;
432432
433433 dotString += ` "${ currentStep } " -> "${ nextStep } " [penwidth=${ thickness } , color="${ edgeColor } ", tooltip="${ tooltip } "];\n` ;
434434 }
@@ -437,7 +437,7 @@ export function generateDotString(
437437 for ( let rank = 0 ; rank < totalSteps ; rank ++ ) {
438438 const currentStep = steps [ rank ] ;
439439 const color = calculateColor ( rank , totalSteps ) ;
440- const nodeTooltip = `Rank:\n\t\t ${ rank + 1 } \nColor:\n\t\t ${ color } \nTotal Students:\n\t\t${ totalNodeEdges [ currentStep ] || 0 } ` ;
440+ const nodeTooltip = `Rank:\n\t\t${ rank + 1 } \nColor:\n\t\t${ color } \nTotal Students:\n\t\t${ totalNodeEdges [ currentStep ] || 0 } ` ;
441441
442442 dotString += ` "${ currentStep } " [rank=${ rank + 1 } , style=filled, fillcolor="${ color } ", tooltip="${ nodeTooltip } "];\n` ;
443443 }
@@ -453,30 +453,30 @@ export function generateDotString(
453453 const color = calculateEdgeColors ( outcomes ) ;
454454 const outcomesStr = Object . entries ( outcomes )
455455 . map ( ( [ outcome , count ] ) => `${ outcome } : ${ count } ` )
456- . join ( '\n\t\t ' ) ;
456+ . join ( '\n\t\t' ) ;
457457
458458 if ( edgeCount > minVisits ) {
459459 let tooltip = `${ currentStep } to ${ nextStep } \n\n`
460460 + `Student Statistics:\n`
461461 + `- Total Students at ${ currentStep } : \n\t\t${ totalCount || 0 } \n`
462- + `- Unique Students on this path: \n\t\t ${ edgeCount } \n`
463- + `- Total Edge Visits: \n\t\t ${ visits } \n` ;
462+ + `- Unique Students on this path: \n\t\t${ edgeCount } \n`
463+ + `- Total Edge Visits: \n\t\t${ visits } \n` ;
464464
465465 // Add repeat visit information for all edges
466466 if ( repeatVisits [ edge ] ) {
467467 const repeatCounts = Object . values ( repeatVisits [ edge ] ) ;
468468 const studentsWithRepeats = repeatCounts . filter ( count => count > 1 ) . length ;
469469 const maxRepeats = Math . max ( ...repeatCounts ) ;
470- tooltip += `- Students who repeated this path: \n\t\t ${ studentsWithRepeats } \n`
471- + `- Maximum visits by a student: \n\t\t ${ maxRepeats } \n` ;
470+ tooltip += `- Students who repeated this path: \n\t\t${ studentsWithRepeats } \n`
471+ + `- Maximum visits by a student: \n\t\t${ maxRepeats } \n` ;
472472 }
473473
474474 tooltip += `\nPath Statistics:\n`
475475 + `- Ratio: \n\t\t${ ( ( ratioEdges [ edge ] || 0 ) * 100 ) . toFixed ( 2 ) } % of students at ${ currentStep } go to ${ nextStep } \n`
476- + `- Outcomes: \n\t\t ${ outcomesStr } \n`
476+ + `- Outcomes: \n\t\t${ outcomesStr } \n`
477477 + `\nVisual Properties:\n`
478- + `- Color: \n\t\t Hex : ${ color } \n`
479- + `\t\t RGB : ${ [ parseInt ( color . substring ( 1 , 3 ) , 16 ) , parseInt ( color . substring ( 3 , 5 ) , 16 ) , parseInt ( color . substring ( 5 , 7 ) , 16 ) ] } ` ;
478+ + `- Color: \n\t\tHex : ${ color } \n`
479+ + `\t\tRGB : ${ [ parseInt ( color . substring ( 1 , 3 ) , 16 ) , parseInt ( color . substring ( 3 , 5 ) , 16 ) , parseInt ( color . substring ( 5 , 7 ) , 16 ) ] } ` ;
480480
481481 dotString += ` "${ currentStep } " -> "${ nextStep } " [penwidth=${ thickness } , color="${ color } ", tooltip="${ tooltip } "];\n` ;
482482 }
0 commit comments