@@ -246,8 +246,8 @@ function createGraph(chord_matrix, clusters, labels, heatmap, title) {
246
246
. on ( "mouseout" , fade ( 1.0 ) ) ;
247
247
248
248
g . append ( "svg:path" )
249
- . style ( "stroke" , function ( d ) { return fill ( clusters [ d . index ] ) ; } )
250
- . style ( "fill" , function ( d ) { return fill ( clusters [ d . index ] ) ; } )
249
+ . style ( "stroke" , function ( d ) { return d3Cat10Colors ( clusters [ d . index ] ) ; } )
250
+ . style ( "fill" , function ( d ) { return d3Cat10Colors ( clusters [ d . index ] ) ; } )
251
251
. attr ( "d" , arc ) ;
252
252
253
253
// add gene labels
@@ -311,7 +311,7 @@ function createGraph(chord_matrix, clusters, labels, heatmap, title) {
311
311
. endAngle ( function ( d ) { return d . endAngle + chord_padding / 2 ; } )
312
312
)
313
313
. attr ( "class" , "cluster_arc" )
314
- . attr ( "fill" , function ( d ) { return fill ( d . cluster ) ; } )
314
+ . attr ( "fill" , function ( d ) { return d3Cat10Colors ( d . cluster ) ; } )
315
315
. on ( "mouseover" , fadeCluster ( fade_opacity ) )
316
316
. on ( "mouseout" , fadeCluster ( 1.0 ) ) ;
317
317
@@ -330,8 +330,8 @@ function createGraph(chord_matrix, clusters, labels, heatmap, title) {
330
330
d . target . cluster = clusters [ d . target . index ] ;
331
331
d . pathString = d3 . svg . chord ( ) . radius ( innerRadius ) ( d ) ;
332
332
} )
333
- . style ( "stroke" , function ( d ) { return d3 . rgb ( fill ( clusters [ d . source . index ] ) ) . darker ( ) ; } )
334
- . style ( "fill" , function ( d ) { return fill ( clusters [ d . source . index ] ) ; } )
333
+ . style ( "stroke" , function ( d ) { return d3 . rgb ( d3Cat10Colors ( clusters [ d . source . index ] ) ) . darker ( ) ; } )
334
+ . style ( "fill" , function ( d ) { return d3Cat10Colors ( clusters [ d . source . index ] ) ; } )
335
335
. attr ( "d" , d3 . svg . chord ( ) . radius ( innerRadius ) ) ;
336
336
337
337
// draw a legend for the clusters in the upper right corner
@@ -381,7 +381,7 @@ function drawClusterLegend(clusterLegend) {
381
381
. attr ( "y" , i * 20 )
382
382
. attr ( "width" , 10 )
383
383
. attr ( "height" , 10 )
384
- . style ( "fill" , fill ( d ) ) ;
384
+ . style ( "fill" , d3Cat10Colors ( d ) ) ;
385
385
g . append ( "text" )
386
386
. attr ( "x" , 40 )
387
387
. attr ( "y" , i * 20 + 10 )
@@ -666,8 +666,8 @@ function drawGradientPath(path, i) {
666
666
deltapi = 0 ,
667
667
mask = [ ] ,
668
668
colorGradient = d3 . scale . linear ( )
669
- . range ( [ fill ( path . source . cluster ) ,
670
- fill ( path . target . cluster ) ] )
669
+ . range ( [ d3Cat10Colors ( path . source . cluster ) ,
670
+ d3Cat10Colors ( path . target . cluster ) ] )
671
671
. domain ( [ 0 , n ] ) ;
672
672
673
673
for ( var i = 1 ; i < n ; i ++ ) {
0 commit comments