feat: stacked columns graph

This commit is contained in:
effe 2024-09-14 15:35:09 -04:00
parent 7c00ff585d
commit b6daaff368

View file

@ -181,13 +181,22 @@ public class DashboardView extends Div {
"title: { text: 'Total Expense' }, " + "title: { text: 'Total Expense' }, " +
"stackLabels: { " + "stackLabels: { " +
"enabled: true, " + "enabled: true, " +
"style: { fontWeight: 'bold', color: 'gray' } " + "style: { fontWeight: 'bold', color: 'gray' }, " +
"formatter: function() { " +
" if (this.total > 0) { return this.total; } else { return ''; }" + // Only show total if greater than 0
"}" +
"} " + "} " +
"}, " + "}, " +
"plotOptions: { " + "plotOptions: { " +
"column: { " + "column: { " +
"stacking: 'normal', " + "stacking: 'normal', " +
"dataLabels: { enabled: true } " + "dataLabels: { " +
"enabled: true, " +
"formatter: function() { " +
" if (this.y > 0) { return this.y; } else { return ''; }" + // Only show data label if value > 0
"}," +
"color: 'black'" + // Set label color
"} " +
"} " + "} " +
"}, " + "}, " +
"series: " + seriesData.toString() + " " + "series: " + seriesData.toString() + " " +