77// See https://aboutcode.org for more information about nexB OSS projects.
88//
99
10- const getCssVar = ( name ) => getComputedStyle ( document . documentElement ) . getPropertyValue ( name ) . trim ( ) ;
10+ export const getCssVar = ( name ) => getComputedStyle ( document . documentElement ) . getPropertyValue ( name ) . trim ( ) ;
1111
1212const paletteVars = [
1313 "--bulma-primary" ,
@@ -31,7 +31,7 @@ const getBucketColors = () => [
3131 getCssVar ( "--bulma-danger" ) , getCssVar ( "--bulma-danger" ) // 8-9: Danger
3232] ;
3333
34- const formatWholeNumbersOnly = x => Number . isInteger ( x ) ? x : "" ;
34+ export const formatWholeNumbersOnly = ( x ) => ( Number . isInteger ( x ) ? x : "" ) ;
3535
3636export const renderers = {
3737 donut ( id , config ) {
@@ -75,39 +75,6 @@ export const renderers = {
7575 } ) ;
7676 } ,
7777
78- importer_bar ( id , config ) {
79- bb . generate ( {
80- bindto : `#chart-${ id } ` ,
81- data : {
82- x : "x" ,
83- columns : [ [ "x" , ...config . x_categories ] , ...config . columns ] ,
84- type : "bar" ,
85- colors : {
86- total_advisories : getCssVar ( "--bulma-link" ) ,
87- advisories_with_packages : getCssVar ( "--bulma-primary" ) ,
88- advisories_without_packages : getCssVar ( "--bulma-danger" ) ,
89- advisories_with_exploits : getCssVar ( "--bulma-success" ) ,
90- advisories_without_exploits : getCssVar ( "--bulma-danger" ) ,
91- advisories_with_kev : getCssVar ( "--bulma-warning" ) ,
92- advisories_with_metasploit : getCssVar ( "--bulma-purple" ) ,
93- advisories_with_exploitdb : getCssVar ( "--bulma-success" ) ,
94- advisories_with_ghost_packages : getCssVar ( "--bulma-orange" ) ,
95- advisories_without_ghost_packages : getCssVar ( "--bulma-primary-dark" ) ,
96- } ,
97- names : {
98- total_advisories : "All Advisories" , advisories_with_packages : "Advisories with a Package" ,
99- advisories_without_packages : "Advisories without a Package" , advisories_with_exploits : "Advisories with an Exploit" ,
100- advisories_without_exploits : "Advisories without an Exploit" , advisories_with_kev : "Advisories with KEV" ,
101- advisories_with_metasploit : "Advisories with Metasploit" , advisories_with_exploitdb : "Advisories with Exploit-DB" ,
102- advisories_with_ghost_packages : "Advisories with a Ghost Package" , advisories_without_ghost_packages : "Advisories without a Ghost Package"
103- } ,
104- groups : config . groups
105- } ,
106- axis : { rotated : true , x : { type : "category" } , y : { tick : { format : formatWholeNumbersOnly } } } ,
107- bar : { width : { ratio : 0.8 } } , tooltip : { grouped : true } , legend : { show : true }
108- } ) ;
109- } ,
110-
11178 scatter ( id , config ) {
11279 const [ , ...buckets ] = config . columns [ 0 ] ;
11380 const [ , ...counts ] = config . columns [ 1 ] ;
@@ -158,7 +125,7 @@ export const renderers = {
158125 color : ( defaultColor , dataPoint ) => dataPoint . x !== undefined ? getBucketColors ( ) [ dataPoint . x ] || defaultColor : defaultColor ,
159126 labels : false
160127 } ,
161- bubble : { maxR : 55 } ,
128+ bubble : { maxR : 45 } ,
162129 axis : {
163130 x : {
164131 type : "category" ,
0 commit comments