|
|
@@ -23,6 +23,7 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
|
|
|
private static final String TEMPLATE_RESOURCE = "templates/outlook-exam-sprint-report-template.html";
|
|
|
private static final String DEFAULT_THEME_COLOR = "#448aff";
|
|
|
+ private static final String SVG_CJK_FONT_FAMILY = " font-family=\"'MiSans VF', MiSans, ReportFont, sans-serif\"";
|
|
|
private static final Pattern HEX_COLOR_PATTERN = Pattern.compile("^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$");
|
|
|
private static final int CHART_AXIS_LEFT = 34;
|
|
|
private static final int CHART_AXIS_TOP = 50;
|
|
|
@@ -73,7 +74,8 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
.append("<div class='card'>")
|
|
|
.append("<h3 class='card-title'>考纲词汇掌握情况</h3>")
|
|
|
.append("<div class='chart-box'>")
|
|
|
- .append("<svg class='syllabus-donut-chart' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220' role='img' aria-label='考纲词汇掌握情况'>")
|
|
|
+ .append("<svg class='syllabus-donut-chart'").append(SVG_CJK_FONT_FAMILY)
|
|
|
+ .append(" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220' role='img' aria-label='考纲词汇掌握情况'>")
|
|
|
.append("<circle class='chart-track' cx='110' cy='110' r='76' fill='none' stroke='#e8eef7' stroke-width='18'></circle>")
|
|
|
.append(renderProgressRing("donut-mastered-arc", "donut-mastered-full-circle", 110, 110, 76, masteredPercent, "#448aff"))
|
|
|
.append("<path class='donut-unmastered-arc' d='")
|
|
|
@@ -106,7 +108,8 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
.append("<div class='card'>")
|
|
|
.append("<h3 class='card-title'>真题试卷词汇掌握情况</h3>")
|
|
|
.append("<div class='chart-box'>")
|
|
|
- .append("<svg class='past-paper-column-chart' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 220' role='img' aria-label='真题试卷词汇掌握情况'>")
|
|
|
+ .append("<svg class='past-paper-column-chart'").append(SVG_CJK_FONT_FAMILY)
|
|
|
+ .append(" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 220' role='img' aria-label='真题试卷词汇掌握情况'>")
|
|
|
.append(renderChartAxes(320))
|
|
|
.append(renderYAxisTicks(axisMax, 250))
|
|
|
.append(renderXAxisTickMarks(112, 208))
|
|
|
@@ -140,7 +143,8 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
.append("<div class='card'>")
|
|
|
.append("<h3 class='card-title'>常考词汇掌握情况</h3>")
|
|
|
.append("<div class='chart-box'>")
|
|
|
- .append("<svg class='high-frequency-column-chart' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 220' role='img' aria-label='常考词汇掌握情况'>")
|
|
|
+ .append("<svg class='high-frequency-column-chart'").append(SVG_CJK_FONT_FAMILY)
|
|
|
+ .append(" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 220' role='img' aria-label='常考词汇掌握情况'>")
|
|
|
.append(renderChartAxes(320))
|
|
|
.append(renderYAxisTicks(axisMax, 20))
|
|
|
.append(renderXAxisTickMarks(112, 208))
|
|
|
@@ -174,7 +178,8 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
builder.append("<div class='card'>")
|
|
|
.append("<h3 class='card-title'>词频区间掌握度</h3>")
|
|
|
.append("<div class='chart-box'>")
|
|
|
- .append("<svg class='frequency-band-column-chart' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 220' role='img' aria-label='词频区间掌握度'>")
|
|
|
+ .append("<svg class='frequency-band-column-chart'").append(SVG_CJK_FONT_FAMILY)
|
|
|
+ .append(" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 220' role='img' aria-label='词频区间掌握度'>")
|
|
|
.append(renderChartAxes(360))
|
|
|
.append(renderYAxisTicks(axisMax, 50))
|
|
|
.append(renderXAxisTickMarks(97, 187, 277));
|
|
|
@@ -286,7 +291,8 @@ public class ClasspathOutlookExamSprintReportRenderer implements ExamSprintRepor
|
|
|
.append("<tr class='student-case-row'>")
|
|
|
.append("<td class='case-chart-cell'>")
|
|
|
.append("<div class='case-chart'>")
|
|
|
- .append("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 260' role='img' aria-label='上届学员提分案例图示'>")
|
|
|
+ .append("<svg").append(SVG_CJK_FONT_FAMILY)
|
|
|
+ .append(" xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 260' role='img' aria-label='上届学员提分案例图示'>")
|
|
|
.append("<circle cx='130' cy='130' r='86' fill='none' stroke='#ffe3c7' stroke-width='18'></circle>")
|
|
|
.append(renderProgressRing("case-progress-arc", "case-progress-full-circle", 130, 130, 86, progressPercent, "#ff7d00"))
|
|
|
.append("<text x='130' y='124' text-anchor='middle' fill='#8a5d36' font-size='26' font-weight='700'>")
|