File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change 1- const COLORS = [
1+ /*
2+ PHP-Frameworks-Bench
3+ */
4+
5+ const COLORS_ = [
26 "#3273a8" ,
37 "#3a78ac" ,
48 "#437cae" ,
@@ -21,10 +25,19 @@ const COLORS = [
2125 "#a87732" ,
2226] ;
2327
24- var rpsChart = document . getElementById ( 'rpsChart' ) ;
25- var memoryChart = document . getElementById ( 'memoryChart' ) ;
26- var timeChart = document . getElementById ( 'timeChart' ) ;
27- var fileChart = document . getElementById ( 'fileChart' ) ;
28+ // For more colors
29+ // I'm lazy to regenerate them again
30+ // so lets have a map to make more
31+ let COLORS = dataRPS . map (
32+ ( item , index ) =>
33+ COLORS_ [ Math . round ( index / ( dataRPS . length / COLORS_ . length ) ) ]
34+ ) ;
35+
36+ var rpsChart = document . getElementById ( "rpsChart" ) ;
37+ var memoryChart = document . getElementById ( "memoryChart" ) ;
38+ var timeChart = document . getElementById ( "timeChart" ) ;
39+ var fileChart = document . getElementById ( "fileChart" ) ;
40+
2841new Chart ( rpsChart , {
2942 type : "bar" ,
3043 data : {
You can’t perform that action at this time.
0 commit comments