goffice r2326 - in trunk: . plugins/plot_barcol plugins/plot_distrib plugins/plot_pie
- From: jbrefort svn gnome org
- To: svn-commits-list gnome org
- Subject: goffice r2326 - in trunk: . plugins/plot_barcol plugins/plot_distrib plugins/plot_pie
- Date: Fri, 6 Mar 2009 09:51:45 +0000 (UTC)
Author: jbrefort
Date: Fri Mar 6 09:51:45 2009
New Revision: 2326
URL: http://svn.gnome.org/viewvc/goffice?rev=2326&view=rev
Log:
2009-03-06 Jean Brefort <jean brefort normalesup org>
* plugins/plot_barcol/gog-barcol.c: (gog_barcol_view_render): correctly
use points other than the first one. [#574349]
* plugins/plot_distrib/gog-histogram.c: don't show a marker in the
legend. [#574340]
* plugins/plot_pie/gog-pie.c: (gog_pie_view_render): skip points when
the datum is skipped. [#574348]
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/plugins/plot_barcol/gog-barcol.c
trunk/plugins/plot_distrib/gog-histogram.c
trunk/plugins/plot_pie/gog-pie.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Mar 6 09:51:45 2009
@@ -2,6 +2,9 @@
Jean:
* Add go_gtk_show_url. [#559021]
+ * Don't display markers in histogram legend. [#574340]
+ * Skip points corresponding to invalid valies in pie charts. [#574348]
+ * Correctly use all points defined in bar/columns plot series. [#574349]
Morten:
* Fix a pixbuf scaling problem in foocanvas.
Modified: trunk/plugins/plot_barcol/gog-barcol.c
==============================================================================
--- trunk/plugins/plot_barcol/gog-barcol.c (original)
+++ trunk/plugins/plot_barcol/gog-barcol.c Fri Mar 6 09:51:45 2009
@@ -378,7 +378,7 @@
double plus, minus;
GogObjectRole const *role = NULL;
GogSeriesElement *gse;
- GList const *overrides;
+ GList const **overrides;
if (num_elements <= 0 || num_series <= 0)
return;
@@ -405,6 +405,7 @@
error_data = g_alloca (num_series * sizeof (ErrorBarData *));
lines = g_alloca (num_series * sizeof (GogSeriesLines *));
paths = g_alloca (num_series * sizeof (GOPath *));
+ overrides = g_alloca (num_series * sizeof (GSList *));
i = 0;
for (ptr = gog_1_5d_model->base.series ; ptr != NULL ; ptr = ptr->next) {
@@ -417,6 +418,7 @@
GO_DATA_VECTOR (series->base.values[1].data));
styles[i] = GOG_STYLED_OBJECT (series)->style;
errors[i] = series->errors;
+ overrides[i] = gog_series_get_overrides (GOG_SERIES (series));
if (gog_error_bar_is_visible (series->errors))
error_data[i] = g_malloc (sizeof (ErrorBarData) * lengths[i]);
else
@@ -462,7 +464,6 @@
pos_base = neg_base = 0.0;
ptr = gog_1_5d_model->base.series;
for (j = 0 ; j < num_series ; j++) {
- overrides = gog_series_get_overrides (GOG_SERIES (ptr->data));
work.y = (double) j * col_step + (double) i - offset + 1.0;
if (i >= lengths[j])
@@ -489,10 +490,10 @@
}
gse = NULL;
- if ((overrides != NULL) &&
- (GOG_SERIES_ELEMENT (overrides->data)->index == i)) {
- gse = GOG_SERIES_ELEMENT (overrides->data);
- overrides = overrides->next;
+ if ((overrides[j] != NULL) &&
+ (GOG_SERIES_ELEMENT (overrides[j]->data)->index == i)) {
+ gse = GOG_SERIES_ELEMENT (overrides[j]->data);
+ overrides[j] = overrides[j]->next;
gog_renderer_push_style (view->renderer,
gog_styled_object_get_style (
GOG_STYLED_OBJECT (gse)));
Modified: trunk/plugins/plot_distrib/gog-histogram.c
==============================================================================
--- trunk/plugins/plot_distrib/gog-histogram.c (original)
+++ trunk/plugins/plot_distrib/gog-histogram.c Fri Mar 6 09:51:45 2009
@@ -193,7 +193,7 @@
plot_klass->desc.num_series_max = 1;
plot_klass->series_type = gog_histogram_plot_series_get_type ();
plot_klass->axis_set = GOG_AXIS_SET_XY;
- plot_klass->desc.series.style_fields = GOG_STYLE_LINE | GOG_STYLE_FILL;
+ plot_klass->desc.series.style_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL;
plot_klass->axis_get_bounds = gog_histogram_plot_axis_get_bounds;
}
@@ -445,14 +445,6 @@
}
static void
-gog_histogram_plot_series_init_style (GogStyledObject *gso, GogStyle *style)
-{
- ((GogStyledObjectClass*) gog_histogram_plot_series_parent_klass)->init_style (gso, style);
-
- style->outline.dash_type = GO_LINE_NONE;
-}
-
-static void
gog_histogram_plot_series_finalize (GObject *obj)
{
GogHistogramPlotSeries *series = GOG_HISTOGRAM_PLOT_SERIES (obj);
@@ -500,7 +492,6 @@
gog_histogram_plot_series_parent_klass = g_type_class_peek_parent (obj_klass);
obj_klass->update = gog_histogram_plot_series_update;
gog_klass->view_type = gog_histogram_series_view_get_type ();
- gso_klass->init_style = gog_histogram_plot_series_init_style;
gog_object_register_roles (gog_klass, roles, G_N_ELEMENTS (roles));
Modified: trunk/plugins/plot_pie/gog-pie.c
==============================================================================
--- trunk/plugins/plot_pie/gog-pie.c (original)
+++ trunk/plugins/plot_pie/gog-pie.c Fri Mar 6 09:51:45 2009
@@ -727,8 +727,12 @@
overrides = gog_series_get_overrides (GOG_SERIES (series));
for (k = 0 ; k < series->base.num_elements; k++) {
len = fabs (vals[k]) * scale;
- if (!go_finite (len) || len < 1e-3)
+ if (!go_finite (len) || len < 1e-3) {
+ if ((overrides != NULL) &&
+ (GOG_SERIES_ELEMENT (overrides->data)->index == k))
+ overrides = overrides->next;
continue;
+ }
gpse = NULL;
if ((overrides != NULL) &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]