goffice r2250 - in trunk: . plugins/plot_surface



Author: jbrefort
Date: Fri Oct 24 18:47:40 2008
New Revision: 2250
URL: http://svn.gnome.org/viewvc/goffice?rev=2250&view=rev

Log:
2008-10-24  Jean Brefort  <jean brefort normalesup org>

	* plugins/plot_surface/xl-surface.c: (get_y_vector): add labels if none
	is given,
	(xl_contour_plot_class_init): use GOG_SEIRES_SUGGESTED for categories.



Modified:
   trunk/ChangeLog
   trunk/plugins/plot_surface/xl-surface.c

Modified: trunk/plugins/plot_surface/xl-surface.c
==============================================================================
--- trunk/plugins/plot_surface/xl-surface.c	(original)
+++ trunk/plugins/plot_surface/xl-surface.c	Fri Oct 24 18:47:40 2008
@@ -163,11 +163,12 @@
 
 		if (!gog_series_is_valid (GOG_SERIES (series)))
 			continue;
-		(*y_labels) [i] = go_data_scalar_get_str (GO_DATA_SCALAR (
-				series->values[-1].data));
+		(*y_labels) [i] = (series->values[-1].data)?
+				g_strdup (go_data_scalar_get_str (GO_DATA_SCALAR (series->values[-1].data))):
+				g_strdup_printf("S%d", i + 1); /* excel like labels */
 	}
 
-	return GO_DATA_VECTOR (go_data_vector_str_new (*y_labels, i, NULL));
+	return GO_DATA_VECTOR (go_data_vector_str_new (*y_labels, i, g_free));
 }
 
 static GOData *
@@ -303,7 +304,7 @@
 
 	{
 		static GogSeriesDimDesc dimensions[] = {
-			{ N_("X"), GOG_SERIES_REQUIRED, FALSE,
+			{ N_("X"), GOG_SERIES_SUGGESTED, FALSE,
 			  GOG_DIM_LABEL, GOG_MS_DIM_CATEGORIES },
 			{ N_("Z"), GOG_SERIES_REQUIRED, FALSE,
 			  GOG_DIM_VALUE, GOG_MS_DIM_VALUES },



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