feat: stacked columns graph
This commit is contained in:
parent
7c00ff585d
commit
b6daaff368
1 changed files with 11 additions and 2 deletions
|
@ -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() + " " +
|
||||||
|
|
Loading…
Reference in a new issue