@@ -695,6 +695,16 @@ function createServiceTreemap() {
695695 options : {
696696 responsive : true ,
697697 maintainAspectRatio : false ,
698+ onClick : ( event , elements ) => {
699+ if ( elements . length > 0 ) {
700+ const element = elements [ 0 ] ;
701+ const service = element . element . $context . raw . _data ?. service ;
702+ if ( service ) {
703+ // Navigate to paths page with service filter
704+ window . location . href = `/paths/?service=${ service . toLowerCase ( ) } ` ;
705+ }
706+ }
707+ } ,
698708 plugins : {
699709 legend : { display : false } ,
700710 tooltip : {
@@ -704,7 +714,7 @@ function createServiceTreemap() {
704714 } ,
705715 label : function ( context ) {
706716 const count = context . raw . _data ?. count || 0 ;
707- return `${ count } paths` ;
717+ return `${ count } paths (Click to view paths) ` ;
708718 }
709719 }
710720 }
@@ -760,6 +770,16 @@ function createCategoryChart() {
760770 options : {
761771 responsive : true ,
762772 maintainAspectRatio : false ,
773+ onClick : ( event , elements ) => {
774+ if ( elements . length > 0 ) {
775+ const index = elements [ 0 ] . index ;
776+ const categoryKey = Object . keys ( categoryCounts ) [ index ] ;
777+ if ( categoryKey ) {
778+ // Navigate to paths page with category filter
779+ window . location . href = `/paths/?category=${ categoryKey } ` ;
780+ }
781+ }
782+ } ,
763783 plugins : {
764784 legend : {
765785 display : false
@@ -770,7 +790,7 @@ function createCategoryChart() {
770790 const label = context . label || '' ;
771791 const value = context . parsed ;
772792 const percentage = Math . round ( ( value / allPaths . length ) * 100 ) ;
773- return `${ label } : ${ value } paths (${ percentage } %)` ;
793+ return `${ label } : ${ value } paths (${ percentage } %) - Click to view paths ` ;
774794 }
775795 }
776796 }
@@ -856,6 +876,14 @@ function createDetectionCoverageRing() {
856876 options : {
857877 responsive : true ,
858878 maintainAspectRatio : false ,
879+ onClick : ( event , elements ) => {
880+ if ( elements . length > 0 ) {
881+ const index = elements [ 0 ] . index ;
882+ // 0 = With Detection, 1 = Without Detection
883+ const detectionParam = index === 0 ? 'any' : 'none' ;
884+ window . location . href = `/paths/?detection=${ detectionParam } ` ;
885+ }
886+ } ,
859887 plugins : {
860888 legend : {
861889 display : false
@@ -866,7 +894,7 @@ function createDetectionCoverageRing() {
866894 const label = context . label || '' ;
867895 const value = context . parsed ;
868896 const percentage = Math . round ( ( value / allPaths . length ) * 100 ) ;
869- return `${ label } : ${ value } paths (${ percentage } %)` ;
897+ return `${ label } : ${ value } paths (${ percentage } %) - Click to view paths ` ;
870898 }
871899 }
872900 }
@@ -968,6 +996,13 @@ function createDetectionToolsChart() {
968996 indexAxis : 'y' ,
969997 responsive : true ,
970998 maintainAspectRatio : false ,
999+ onClick : ( event , elements ) => {
1000+ if ( elements . length > 0 ) {
1001+ const index = elements [ 0 ] . index ;
1002+ const toolName = sortedTools [ index ] [ 0 ] ; // Get original tool name
1003+ window . location . href = `/paths/?detection=${ toolName } ` ;
1004+ }
1005+ } ,
9711006 plugins : {
9721007 legend : {
9731008 display : false
@@ -976,7 +1011,7 @@ function createDetectionToolsChart() {
9761011 callbacks : {
9771012 label : function ( context ) {
9781013 const percentage = Math . round ( ( context . parsed . x / allPaths . length ) * 100 ) ;
979- return `${ context . parsed . x } paths (${ percentage } %)` ;
1014+ return `${ context . parsed . x } paths (${ percentage } %) - Click to view paths ` ;
9801015 }
9811016 }
9821017 } ,
0 commit comments