goffice r2360 - in trunk: . plugins/plot_barcol



Author: jbrefort
Date: Tue Mar 31 05:45:41 2009
New Revision: 2360
URL: http://svn.gnome.org/viewvc/goffice?rev=2360&view=rev

Log:
2009-03-31  Jean Brefort  <jean brefort normalesup org>

	* plugins/plot_barcol/gog-line.c: (gog_line_view_render): fix area
	plots rendering.



Modified:
   trunk/ChangeLog
   trunk/plugins/plot_barcol/gog-line.c

Modified: trunk/plugins/plot_barcol/gog-line.c
==============================================================================
--- trunk/plugins/plot_barcol/gog-line.c	(original)
+++ trunk/plugins/plot_barcol/gog-line.c	Tue Mar 31 05:45:41 2009
@@ -427,7 +427,7 @@
 	GogObjectRole const *role = NULL;
 	GogSeriesLines **lines;
 
-	double y_zero, y_top, drop_lines_y_min, drop_lines_y_max;
+	double y_zero, y_top, y_bottom, drop_lines_y_min, drop_lines_y_max;
 	double abs_sum, sum, value, x, y = 0.;
 	gboolean is_null, is_area_plot;
 
@@ -460,10 +460,10 @@
 	gog_axis_map_get_extents (y_map, &drop_lines_y_min, &drop_lines_y_max); 
 	drop_lines_y_min = gog_axis_map_to_view (y_map, drop_lines_y_min);
 	drop_lines_y_max = gog_axis_map_to_view (y_map, drop_lines_y_max);
-	gog_axis_map_get_extents (y_map, &y_zero, &y_top);
-	y_zero = gog_axis_map_to_view (y_map, y_zero);
+	gog_axis_map_get_extents (y_map, &y_bottom, &y_top);
+	y_bottom = gog_axis_map_to_view (y_map, y_bottom);
 	y_top = gog_axis_map_to_view (y_map, y_top);
-//	y_zero = gog_axis_map_get_baseline (y_map); 
+	y_zero = gog_axis_map_get_baseline (y_map); 
 
 	vals    = g_alloca (num_series * sizeof (double *));
 	error_data = g_alloca (num_series * sizeof (ErrorBarData *));
@@ -608,7 +608,7 @@
 				GogAxisPosition pos = gog_axis_base_get_clamped_position (GOG_AXIS_BASE (axis));
 				switch (pos) {
 				case GOG_AXIS_AT_LOW:
-					y_target = gog_axis_map_is_inverted (y_map)? y_top: y_zero;
+					y_target = gog_axis_map_is_inverted (y_map)? y_top: y_bottom;
 					break;
 				case GOG_AXIS_CROSS: {
 					GogChartMap *c_map;
@@ -622,7 +622,7 @@
 					break;
 				}
 				case GOG_AXIS_AT_HIGH:
-					y_target = gog_axis_map_is_inverted (y_map)? y_zero: y_top;
+					y_target = gog_axis_map_is_inverted (y_map)? y_bottom: y_top;
 					break;
 				default:
 					/* this should not occur */



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