[kmymoney4] [Bug 383161] Broken net worth graph in case data contains only the same value

2017-08-07 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=383161

--- Comment #6 from Ralf Habacker  ---
Git commit 6e5b5fd698aac46906e37b2ba3ac0c1e2fc5edfb by Ralf Habacker.
Committed on 07/08/2017 at 08:58.
Pushed by habacker into branch '4.8'.

Do not use static cast to avoid crashes in case the plane does not have the
expected type

Thanks to Lukasz Wojnilowicz for pointing out.

M  +4-2kmymoney/reports/kreportchartview.cpp

https://commits.kde.org/kmymoney/6e5b5fd698aac46906e37b2ba3ac0c1e2fc5edfb

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmymoney4] [Bug 383161] Broken net worth graph in case data contains only the same value

2017-08-06 Thread NSLW
https://bugs.kde.org/show_bug.cgi?id=383161

--- Comment #5 from NSLW  ---
Created attachment 107099
  --> https://bugs.kde.org/attachment.cgi?id=107099=edit
Net worth graph on master

(In reply to Ralf Habacker from comment #3)
> I don't think that this is the same bug as 338642. 


I tested your file on master (see attached image) and it doesn't pose problem
for me. All test passed as well.
With your patch you caused to lose one of nice feature I introduced there and
additionally introduced a big segmentation fault, crash or something like that.

Not all of graphs are on CartesianCoordinatePlane and you make static_cast for
all of them there.

Your behaviour is irritating. You don't test your code (this is great example),
you don't consult your code (see bug #383165) and the code you're pushing is
misleading (see commit cb841612e11349aca26b6c4af4ff7dced9a95357). Your work is
very much obfuscated, so come to order or stop doing that.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmymoney4] [Bug 383161] Broken net worth graph in case data contains only the same value

2017-08-05 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=383161

--- Comment #4 from Ralf Habacker  ---
(In reply to Ralf Habacker from comment #3)
> 
>   QVector< double > vec0,  vec1, vec2;
> -  vec0 << 5 << 1 << 3 << 4 << 1;
> -  vec1 << 3 << 6 << 2 << 4 << 8;
> -  vec2 << 0 << 7 << 1 << 2 << 1;´
> +// vec0 << 5 << 1 << 3 << 4 << 1;
> +// vec1 << 3 << 6 << 2 << 4 << 8;
> +  vec3 << 7 << 7 << 7 << 7 << 7;
This should be vec2 instead, sorry.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmymoney4] [Bug 383161] Broken net worth graph in case data contains only the same value

2017-08-05 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=383161

--- Comment #3 from Ralf Habacker  ---
(In reply to NSLW from comment #2)
> Ralf, it would be better if you would test master version before 'producing'
> bug.
> *** This bug has been marked as a duplicate of bug 338642 ***

I don't think that this is the same bug as 338642. 

git master now contains a short KChart widget test. You may modify
kmymoney/reports/tests/chart-test.cpp as shown below:

  QVector< double > vec0,  vec1, vec2;
-  vec0 << 5 << 1 << 3 << 4 << 1;
-  vec1 << 3 << 6 << 2 << 4 << 8;
-  vec2 << 0 << 7 << 1 << 2 << 1;´
+// vec0 << 5 << 1 << 3 << 4 << 1;
+// vec1 << 3 << 6 << 2 << 4 << 8;
+  vec3 << 7 << 7 << 7 << 7 << 7;

and let the app run which shows the mentioned behavior.

Then modify

  CartesianAxis *yAxis = new CartesianAxis (widget.lineDiagram() );
+
static_cast(widget.lineDiagram()->coordinatePlane())->setAutoAdjustVerticalRangeToData(101);

and run again - bug is fixed

then modify again

-
static_cast(widget.lineDiagram()->coordinatePlane())->setAutoAdjustVerticalRangeToData(101);
+
static_cast(widget.lineDiagram()->coordinatePlane())->setAutoAdjustVerticalRangeToData(2);

and compile and run again - bug is not fixed.

If you can confirm please restore bug state.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmymoney4] [Bug 383161] Broken net worth graph in case data contains only the same value

2017-08-05 Thread NSLW
https://bugs.kde.org/show_bug.cgi?id=383161

NSLW  changed:

   What|Removed |Added

 Resolution|FIXED   |DUPLICATE
 CC||lukasz.wojnilow...@gmail.co
   ||m

--- Comment #2 from NSLW  ---
Ralf, it would be better if you would test master version before 'producing'
bug.

*** This bug has been marked as a duplicate of bug 338642 ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[kmymoney4] [Bug 383161] Broken net worth graph in case data contains only the same value

2017-08-05 Thread Ralf Habacker
https://bugs.kde.org/show_bug.cgi?id=383161

Ralf Habacker  changed:

   What|Removed |Added

 Resolution|--- |FIXED
  Latest Commit||https://commits.kde.org/kmy
   ||money/df06a0d0e44c4b21c9675
   ||abff4f7809534b65e05
 Status|UNCONFIRMED |RESOLVED
   Version Fixed In||4.8.1

--- Comment #1 from Ralf Habacker  ---
Git commit df06a0d0e44c4b21c9675abff4f7809534b65e05 by Ralf Habacker.
Committed on 05/08/2017 at 09:16.
Pushed by habacker into branch '4.8'.

Fix 'Broken net worth graph in case data contains only the same value'

If chart model contains only data with the same value KDChart 2.6
automatically adjust the vertical range to a non visible area
and displays x axis labels at the top of the diagram.

The fix is to disable "auto adjust vertical range to data". The used
value has been empirically determined.

FIXED-IN:4.8.1

M  +1-0kmymoney/reports/kreportchartview.cpp

https://commits.kde.org/kmymoney/df06a0d0e44c4b21c9675abff4f7809534b65e05

-- 
You are receiving this mail because:
You are watching all bug changes.