[chronojump] CairoBars have 10% of freespace on high part of the graph
- From: Xavier de Blas <xaviblas src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [chronojump] CairoBars have 10% of freespace on high part of the graph
 
- Date: Mon, 23 Aug 2021 16:54:19 +0000 (UTC)
 
commit 360efb9354d94aa81eaeea5238ca120f8695d992
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Aug 23 18:53:18 2021 +0200
    CairoBars have 10% of freespace on high part of the graph
 src/gui/cairo/bars.cs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/cairo/bars.cs b/src/gui/cairo/bars.cs
index 7b18f7aa0..de17a62cd 100644
--- a/src/gui/cairo/bars.cs
+++ b/src/gui/cairo/bars.cs
@@ -165,7 +165,9 @@ public abstract class CairoBars : CairoGeneric
        {
                 return graphHeight - outerMargins - UtilAll.DivideSafe(
                                (realY - minY) * (graphHeight - 2*outerMargins),
-                               maxY - minY);
+                               //maxY - minY);
+                               //have 10% extra margin on the top (highest values will be 10% far from max 
of the graph)
+                               1.1*maxY - minY);
         }
 
        protected void printText (double x, double y, double height, int textHeight,
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]