fix: size of graph colums
This commit is contained in:
parent
a2efef0ccf
commit
ce4c9b3a06
1 changed files with 7 additions and 3 deletions
|
@ -214,7 +214,7 @@ public class DashboardView extends Div {
|
||||||
// Generate JavaScript initialization
|
// Generate JavaScript initialization
|
||||||
return "Highcharts.chart('bottomLeftChart', {" +
|
return "Highcharts.chart('bottomLeftChart', {" +
|
||||||
"chart: {" +
|
"chart: {" +
|
||||||
"type: 'column'" +
|
"type: 'column'," + // Specify the chart type as column
|
||||||
"}," +
|
"}," +
|
||||||
"title: {" +
|
"title: {" +
|
||||||
"text: 'Net Balances by Person'" +
|
"text: 'Net Balances by Person'" +
|
||||||
|
@ -232,12 +232,16 @@ public class DashboardView extends Div {
|
||||||
"color: '#808080'" +
|
"color: '#808080'" +
|
||||||
"}]" +
|
"}]" +
|
||||||
"}," +
|
"}," +
|
||||||
|
"plotOptions: {" + // Add plotOptions to configure the column width
|
||||||
|
"column: {" +
|
||||||
|
"pointWidth: 50" + // Adjust the width of the columns (in pixels)
|
||||||
|
"}" +
|
||||||
|
"}," +
|
||||||
"series: [{" +
|
"series: [{" +
|
||||||
"name: 'Balance'," +
|
"name: 'Balance'," +
|
||||||
"data: " + data + // Use the data fetched from DB
|
"data: " + data + // Use the data fetched from DB
|
||||||
"}]" +
|
"}]" +
|
||||||
"});";
|
"});"; }
|
||||||
}
|
|
||||||
|
|
||||||
private String generatePlaceholderChartScript(String divId, String title) {
|
private String generatePlaceholderChartScript(String divId, String title) {
|
||||||
return "Highcharts.chart('" + divId + "', {" +
|
return "Highcharts.chart('" + divId + "', {" +
|
||||||
|
|
Loading…
Reference in a new issue