[goffice] graphs: fix problem with trend lines and inverted axis.



commit 00825e39f5fe8121824ea5624fda894d6b02d7ee
Author: Morten Welinder <terra gnome org>
Date:   Fri May 28 13:16:53 2010 -0400

    graphs: fix problem with trend lines and inverted axis.

 ChangeLog                     |    6 ++++++
 NEWS                          |    3 +++
 goffice/graph/gog-chart-map.c |    2 +-
 3 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d49f588..edcb392 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,12 @@
 	* goffice/graph/gog-renderer.c (gog_renderer_export_image): ditto.
 	* plugins/plot_pie/gog-pie.c: ditto.
 
+2010-05-28  Morten Welinder  <terra gnome org>
+
+	* goffice/graph/gog-chart-map.c (make_path_cspline): Both
+	increasing and decreasing coordinates are ok.  Fixes #619958.
+	(Tracked down by Jean.)
+
 2010-05-23  Morten Welinder  <terra gnome org>
 
 	* goffice/math/go-rangefunc.c (go_range_sumsq): Do square in
diff --git a/NEWS b/NEWS
index cd0603f..7a3c056 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,9 @@ goffice 0.8.5:
 Bobby Powers:
 	* Fix the --without-gtk winbuild. [#619312]
 
+Morten:
+	* Fix trend-line problem with inverted x-axis.  [#619958]
+
 --------------------------------------------------------------------------
 goffice 0.8.4:
 
diff --git a/goffice/graph/gog-chart-map.c b/goffice/graph/gog-chart-map.c
index 65517fa..4fc0b5a 100644
--- a/goffice/graph/gog-chart-map.c
+++ b/goffice/graph/gog-chart-map.c
@@ -342,7 +342,7 @@ make_path_cspline (GogChartMap *map,
 	GOCSpline *spline;
 
 	path = go_path_new ();
-	if (n_points < 1 || !go_range_increasing (x, n_points))
+	if (n_points < 1 || !go_range_vary_uniformly (x, n_points))
 		return path;
 
 	uu = g_new (double, n_points);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]