@@ -2698,7 +2698,7 @@ export class BiowcPathwaygraph extends LitElement {
2698
2698
// Determine width and height of the legend.
2699
2699
// Width is constant, height is larger if the legend contains a color scale
2700
2700
const legendWidth = 265 ;
2701
- const legendHeight = drawColorLegend ? 285 : 210 ;
2701
+ const legendHeight = drawColorLegend ? 357 : 277 ;
2702
2702
2703
2703
// Draw the frame
2704
2704
legendSvg
@@ -3039,10 +3039,86 @@ export class BiowcPathwaygraph extends LitElement {
3039
3039
yOffset * scalingFactor + lineHeight * 7 + paragraphMargin * 1
3040
3040
) ;
3041
3041
3042
+ legendSvg
3043
+ . append ( 'text' )
3044
+ . attr ( 'class' , 'legend' )
3045
+ . text ( 'Protein Activity:' )
3046
+ . attr ( 'x' , xOffset )
3047
+ . attr (
3048
+ 'y' ,
3049
+ yOffset * scalingFactor + lineHeight * 8 + paragraphMargin * 1
3050
+ ) ;
3051
+
3052
+ legendSvg
3053
+ . append ( 'rect' )
3054
+ . attr ( 'class' , 'node-rect gene_protein legend' )
3055
+ . attr ( 'x' , xOffset )
3056
+ . attr ( 'y' , yOffset + lineHeight * 9 + paragraphMargin * 0 )
3057
+ . attr ( 'transform' , 'translate(0,-15)' )
3058
+ . attr ( 'rx' , 10 * scalingFactor )
3059
+ . attr ( 'ry' , 30 * scalingFactor )
3060
+ . attr ( 'width' , 35 * scalingFactor )
3061
+ . attr ( 'height' , 25 * scalingFactor )
3062
+ . style ( 'stroke' , '#c20000' )
3063
+ . style ( 'stroke-width' , 4 ) ;
3064
+ legendSvg
3065
+ . append ( 'text' )
3066
+ . attr ( 'class' , 'legend' )
3067
+ . text ( 'Increased' )
3068
+ . attr ( 'x' , xOffset + 22 )
3069
+ . attr (
3070
+ 'y' ,
3071
+ yOffset * scalingFactor + 3 + lineHeight * 9 + paragraphMargin * 0
3072
+ ) ;
3073
+
3074
+ legendSvg
3075
+ . append ( 'rect' )
3076
+ . attr ( 'class' , 'node-rect gene_protein legend' )
3077
+ . attr ( 'x' , xOffset + 100 )
3078
+ . attr ( 'y' , yOffset + lineHeight * 9 + paragraphMargin * 0 )
3079
+ . attr ( 'transform' , 'translate(0,-15)' )
3080
+ . attr ( 'rx' , 10 * scalingFactor )
3081
+ . attr ( 'ry' , 30 * scalingFactor )
3082
+ . attr ( 'width' , 35 * scalingFactor )
3083
+ . attr ( 'height' , 25 * scalingFactor )
3084
+ . style ( 'stroke' , '#0043c2' )
3085
+ . style ( 'stroke-width' , 4 ) ;
3086
+ legendSvg
3087
+ . append ( 'text' )
3088
+ . attr ( 'class' , 'legend' )
3089
+ . text ( 'Decreased' )
3090
+ . attr ( 'x' , xOffset + 122 )
3091
+ . attr (
3092
+ 'y' ,
3093
+ yOffset * scalingFactor + 3 + lineHeight * 9 + paragraphMargin * 0
3094
+ ) ;
3095
+
3096
+ legendSvg
3097
+ . append ( 'rect' )
3098
+ . attr ( 'class' , 'node-rect gene_protein legend' )
3099
+ . attr ( 'x' , xOffset )
3100
+ . attr ( 'y' , yOffset + lineHeight * 10 + paragraphMargin * 0 )
3101
+ . attr ( 'transform' , 'translate(0,-15)' )
3102
+ . attr ( 'rx' , 10 * scalingFactor )
3103
+ . attr ( 'ry' , 30 * scalingFactor )
3104
+ . attr ( 'width' , 35 * scalingFactor )
3105
+ . attr ( 'height' , 25 * scalingFactor )
3106
+ . style ( 'stroke' , '#8100c2' )
3107
+ . style ( 'stroke-width' , 4 ) ;
3108
+ legendSvg
3109
+ . append ( 'text' )
3110
+ . attr ( 'class' , 'legend' )
3111
+ . text ( 'Unknown Direction' )
3112
+ . attr ( 'x' , xOffset + 22 )
3113
+ . attr (
3114
+ 'y' ,
3115
+ yOffset * scalingFactor + 3 + lineHeight * 10 + paragraphMargin * 0
3116
+ ) ;
3117
+
3042
3118
if ( drawColorLegend ) {
3043
3119
const colorLegendGroupPosition = [
3044
3120
xOffset + 5 ,
3045
- yOffset * scalingFactor + lineHeight * 8 + paragraphMargin * 2 + 10 ,
3121
+ yOffset * scalingFactor + lineHeight * 11 + paragraphMargin * 2 + 10 ,
3046
3122
] ;
3047
3123
const colorLegendGroup = legendSvg
3048
3124
. append ( 'g' )
0 commit comments