Skip to content

Commit d48d5d8

Browse files
#16 Adding chart legend
1 parent 5f07f19 commit d48d5d8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

refactor-first-maven-plugin/src/main/java/org/hjug/mavenreport/RefactorFirstMavenReport.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@ public class RefactorFirstMavenReport extends AbstractMojo {
4343
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n" +
4444
" <meta name=\"generator\" content=\"Apache Maven Doxia Site Renderer 1.9.2\" />";
4545

46+
private static final String LEGEND =
47+
" <h2>Chart Legend:</h2>" +
48+
" <table border=\"5px\">\n" +
49+
" <tbody>\n" +
50+
" <tr><td><strong>X-Axis:</strong> Effort to refactor to a non-God class</td></tr>\n" +
51+
" <tr><td><strong>Y-Axis:</strong> Relative churn</td></tr>\n" +
52+
" <tr><td><strong>Color:</strong> Rank of what to fix first</td></tr>\n" +
53+
" <tr><td><strong>Circle size:</strong> Number of simple non-getter/setter methods</td></tr>\n" +
54+
" </tbody>\n" +
55+
" </table>" +
56+
" <br/>";
57+
4658
private static final String THE_END =
4759
"</div>\n" +
4860
" </div>\n" +
@@ -213,7 +225,10 @@ public void execute() {
213225
}
214226

215227
writeGchartJs(rankedDisharmonies);
228+
stringBuilder.append(LEGEND);
229+
216230

231+
stringBuilder.append("<h2>God classes by the numbers:</h2>");
217232
stringBuilder.append("<table border=\"5px\" class=\"table table-striped\">");
218233

219234
// Content

0 commit comments

Comments
 (0)