Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BudgetMaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robert Goldmann
BudgetMaster
Commits
4f0432e2
Commit
4f0432e2
authored
7 years ago
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
Fixed
#147
- categories chart suggested height is to small
parent
dd7d159b
No related branches found
No related tags found
1 merge request
!150
merge v1_3_1 into master
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/de/deadlocker8/budgetmaster/logic/charts/CategoriesChart.java
+19
-15
19 additions, 15 deletions
...eadlocker8/budgetmaster/logic/charts/CategoriesChart.java
with
19 additions
and
15 deletions
src/de/deadlocker8/budgetmaster/logic/charts/CategoriesChart.java
+
19
−
15
View file @
4f0432e2
...
@@ -31,7 +31,8 @@ public class CategoriesChart extends VBox implements ChartExportable
...
@@ -31,7 +31,8 @@ public class CategoriesChart extends VBox implements ChartExportable
private
double
totalIncomes
;
private
double
totalIncomes
;
private
double
totalPayments
;
private
double
totalPayments
;
private
LegendType
legendType
;
private
LegendType
legendType
;
private
final
double
CHART_HEIGHT
=
200
;
private
final
double
FULL_LEGEND_ITEM_HEIGHT
=
40
;
public
CategoriesChart
(
String
titleIncomes
,
String
titlePayments
,
ArrayList
<
CategoryInOutSum
>
categoryInOutSums
,
String
currency
,
LegendType
legendType
)
public
CategoriesChart
(
String
titleIncomes
,
String
titlePayments
,
ArrayList
<
CategoryInOutSum
>
categoryInOutSums
,
String
currency
,
LegendType
legendType
)
{
{
...
@@ -295,13 +296,16 @@ public class CategoriesChart extends VBox implements ChartExportable
...
@@ -295,13 +296,16 @@ public class CategoriesChart extends VBox implements ChartExportable
public
WritableImage
export
(
int
width
,
int
height
)
public
WritableImage
export
(
int
width
,
int
height
)
{
{
VBox
root
=
new
VBox
();
VBox
root
=
new
VBox
();
root
.
setStyle
(
"-fx-background-color: transparent;"
);
root
.
setStyle
(
"-fx-background-color: transparent;"
);
root
.
setPadding
(
new
Insets
(
25
));
root
.
setPadding
(
new
Insets
(
25
));
root
.
setSpacing
(
10
);
root
.
getChildren
().
add
(
generate
(
titleIncomes
,
true
));
root
.
getChildren
().
add
(
generate
(
titleIncomes
,
true
));
root
.
getChildren
().
add
(
generate
(
titlePayments
,
false
));
root
.
getChildren
().
add
(
generate
(
titlePayments
,
false
));
Region
spacer
=
new
Region
();
Region
spacer
=
new
Region
();
spacer
.
setMinHeight
(
25
);
root
.
getChildren
().
add
(
spacer
);
root
.
getChildren
().
add
(
spacer
);
VBox
.
setVgrow
(
spacer
,
Priority
.
ALWAYS
);
VBox
.
setVgrow
(
spacer
,
Priority
.
ALWAYS
);
...
@@ -329,6 +333,6 @@ public class CategoriesChart extends VBox implements ChartExportable
...
@@ -329,6 +333,6 @@ public class CategoriesChart extends VBox implements ChartExportable
@Override
@Override
public
double
getSuggestedHeight
()
public
double
getSuggestedHeight
()
{
{
return
getHeight
()
+
10
0
;
return
CHART_HEIGHT
+
categoryInOutSums
.
size
()
*
FULL_LEGEND_ITEM_HEIGHT
+
5
0
;
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment