[goffice] Fixed invalid data behavior in line and area plots interpolation.



commit 4ec91bbc2d6bf26edb283396124df83d261e7729
Author: Jean Brefort <jean brefort normalesup org>
Date:   Thu Apr 25 08:46:03 2013 +0200

    Fixed invalid data behavior in line and area plots interpolation.

 ChangeLog                      |    7 +++++++
 goffice/graph/gog-series.c     |    3 +++
 plugins/plot_barcol/gog-line.c |    7 +++----
 3 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8cd7f3c..d033264 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-04-25  Jean Brefort  <jean brefort normalesup org>
+
+       * goffice/graph/gog-series.c (gog_series_populate_editor): hide the skip
+       invalid checkbox for line and area plots.
+       * plugins/plot_barcol/gog-line.c (gog_line_view_render): fixed skip invalid
+       test.
+
 2013-04-24  Jean Brefort  <jean brefort normalesup org>
 
        * goffice/graph/gog-series-prefs.ui: fix interpolation selector.
diff --git a/goffice/graph/gog-series.c b/goffice/graph/gog-series.c
index 1b9d075..9abbfe2 100644
--- a/goffice/graph/gog-series.c
+++ b/goffice/graph/gog-series.c
@@ -684,6 +684,9 @@ gog_series_populate_editor (GogObject *gobj,
                        g_signal_connect (w, "toggled",
                                          G_CALLBACK (cb_line_interpolation_skip_changed), series);
                        gtk_widget_show_all (widget);
+                       /* FIXME: a very bad hack to hide this check box for line and area plots */
+                       if (no_bezier)
+                               gtk_widget_hide (w);
                        if (clamp_set) {
                                GtkWidget *w;
                                widget = go_gtk_builder_get_widget (gui, "clamps-grid");
diff --git a/plugins/plot_barcol/gog-line.c b/plugins/plot_barcol/gog-line.c
index 40e69ab..d2252ad 100644
--- a/plugins/plot_barcol/gog-line.c
+++ b/plugins/plot_barcol/gog-line.c
@@ -855,9 +855,7 @@ gog_line_view_render (GogView *view, GogViewAllocation const *bbox)
                                                error_data[i][j].minus = minus;
                                                error_data[i][j].plus = plus;
                                        }
-                                       yvals[i][j] = value;
-                                       if (isnan (y))
-                                               break;
+                                       yvals[i][j] = isnan (y)? go_nan: value;
                                        break;
 
                                case GOG_1_5D_STACKED :
@@ -931,7 +929,8 @@ gog_line_view_render (GogView *view, GogViewAllocation const *bbox)
                if (lengths[i] == 0)
                        continue;
                path = gog_chart_map_make_path (chart_map, NULL, yvals[i], lengths[i],
-                                               interpolations[i], type == GOG_1_5D_NORMAL, NULL);
+                                               interpolations[i], type != GOG_1_5D_NORMAL && !is_area_plot,
+                                               &GOG_AREA_SERIES (series)->clamped_derivs);
 
                gog_renderer_push_style (view->renderer, styles[i]);
 


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