Update table and treemap chart rendering options

This commit is contained in:
RB 2025-08-14 14:09:38 +08:00
parent dc8f060b59
commit 76431d61c5
4 changed files with 14 additions and 4 deletions

View file

@ -19,7 +19,6 @@ import org.apache.commons.lang3.ArrayUtils;
import java.math.BigDecimal;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
@ -113,7 +112,13 @@ public class TableChart extends ChartData {
}
String tableHtml = new TableBuilder(this, dataRaw).toHTML();
return JSONUtils.toJSONObject("html", tableHtml);
JSONObject renderOption = config.getJSONObject("option");
if (renderOption == null) renderOption = new JSONObject();
return JSONUtils.toJSONObject(
new String[]{"html", "_renderOption"},
new Object[]{tableHtml, renderOption});
}
protected boolean isShowLineNumber() {

View file

@ -48,7 +48,8 @@ public class TreemapChart extends ChartData {
JSONObject renderOption = config.getJSONObject("option");
if (renderOption == null) renderOption = new JSONObject();
renderOption.put("dataFlags", new String[] { getNumericalFlag(num1) });
renderOption.put("dataFlags", new String[]{getNumericalFlag(num1)});
renderOption.remove("useBgcolor");
return JSONUtils.toJSONObject(
new String[]{"data", "xLabel", "xAmount", "_renderOption"},

View file

@ -744,6 +744,10 @@ See LICENSE and COMMERCIAL in the project root for license information.
right: 0;
}
.chart-box.TABLE .chart.ctable .table {
background-color: transparent;
}
/* gradient-backgrounds.css */
.gradient-bg-1 {

View file

@ -211,7 +211,7 @@
<option value="macarons">MACARONS</option>
</select>
</div>
<div class="hide bosskey-show-- J_opt-INDEX J_opt-LINE J_opt-BAR J_opt-BAR2 J_opt-BAR3 J_opt-PIE J_opt-FUNNEL J_opt-RADAR J_opt-SCATTER">
<div class="hide bosskey-show-- J_opt-TABLE J_opt-INDEX J_opt-LINE J_opt-BAR J_opt-BAR2 J_opt-BAR3 J_opt-PIE J_opt-FUNNEL J_opt-RADAR J_opt-SCATTER">
<label style="color: #444; margin-bottom: 8px">[[${bundle.L('背景色')}]]</label>
<div id="useBgcolor" class="rbcolors">
<a class="default" th:title="${bundle.L('默认')}"></a>