File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,15 @@ function renderReport(report: Report) {
4949 . map ( shape => ( {
5050 ...shape ,
5151 barColor : getBarColor ( shape . index ) ,
52+ labelClassName : `label ${ shape . name } ` ,
53+ barClassName : `bar ${ shape . name } ` ,
54+ numberClassName : `number ${ shape . name } ` ,
5255 } ) )
5356 const labels = shapes . map ( shape =>
5457 svg `<text
5558 data-index=${ shape . index }
5659 data-name=${ shape . name }
60+ class=${ shape . labelClassName }
5761 x=${ shape . labelX }
5862 y=${ shape . textY }
5963 width=${ shape . labelWidth }
@@ -68,6 +72,7 @@ function renderReport(report: Report) {
6872 svg `<rect
6973 data-index=${ shape . index }
7074 data-name=${ shape . name }
75+ class=${ shape . barClassName }
7176 x=${ shape . barX }
7277 y=${ shape . barY }
7378 width=${ shape . barWidth }
@@ -79,6 +84,7 @@ function renderReport(report: Report) {
7984 svg `<text
8085 data-index=${ shape . index }
8186 data-name=${ shape . name }
87+ class=${ shape . numberClassName }
8288 x=${ shape . numberX }
8389 y=${ shape . textY }
8490 width=${ numberColumnWidth }
You can’t perform that action at this time.
0 commit comments