From ce4c9b3a0604758918cf449bef1d95b9e1fc074e Mon Sep 17 00:00:00 2001 From: filippo-ferrari Date: Sun, 14 Jul 2024 14:49:34 +0200 Subject: [PATCH] fix: size of graph colums --- .../munera/views/expenses/DashboardView.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/application/munera/views/expenses/DashboardView.java b/src/main/java/com/application/munera/views/expenses/DashboardView.java index fe256b2..0fbb029 100644 --- a/src/main/java/com/application/munera/views/expenses/DashboardView.java +++ b/src/main/java/com/application/munera/views/expenses/DashboardView.java @@ -214,7 +214,7 @@ public class DashboardView extends Div { // Generate JavaScript initialization return "Highcharts.chart('bottomLeftChart', {" + "chart: {" + - "type: 'column'" + + "type: 'column'," + // Specify the chart type as column "}," + "title: {" + "text: 'Net Balances by Person'" + @@ -232,12 +232,16 @@ public class DashboardView extends Div { "color: '#808080'" + "}]" + "}," + + "plotOptions: {" + // Add plotOptions to configure the column width + "column: {" + + "pointWidth: 50" + // Adjust the width of the columns (in pixels) + "}" + + "}," + "series: [{" + "name: 'Balance'," + "data: " + data + // Use the data fetched from DB "}]" + - "});"; - } + "});"; } private String generatePlaceholderChartScript(String divId, String title) { return "Highcharts.chart('" + divId + "', {" +