[goffice] fixed radar plot tooltip when axis is inverse.



commit f5d90b5a24a7d0568b18abc9278e83a6a6cf0fa6
Author: Jean Brefort <jean brefort normalesup org>
Date:   Mon Oct 19 08:12:05 2009 +0200

    fixed radar plot tooltip when axis is inverse.

 ChangeLog                     |    5 +++++
 goffice/graph/gog-chart-map.c |    4 +++-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ea2c0ca..c5b012b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-19  Jean Brefort  <jean brefort normalesup org>
+
+	* goffice/graph/gog-chart-map.c (polar_map_view_to_2D): take radar plot
+	maximum into consideration.
+
 2009-10-18  Morten Welinder  <terra gnome org>
 
 	* goffice/canvas/goc-graph.c (goc_graph_motion): Hook up a timer
diff --git a/goffice/graph/gog-chart-map.c b/goffice/graph/gog-chart-map.c
index 31882b8..e7e913a 100644
--- a/goffice/graph/gog-chart-map.c
+++ b/goffice/graph/gog-chart-map.c
@@ -612,8 +612,10 @@ polar_map_view_to_2D (GogChartMap *map, double x, double y, double *u, double *v
 	/* FIXME: following code looks like a kludge */
 	if (gog_axis_map_is_discrete (map->axis_map[0])) {
 		*u = gog_axis_map_from_view (map->axis_map[0], t);
-		if (*u < 1)
+		if (*u < data->th0)
 			*u = data->th1;
+		else if (*u > data->th1)
+			*u = data->th0;
 	} else {
 		if (t > 0)
 			t -= 2 * M_PI; /* Hmm, why? */



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