[goffice] Fixed various series points issues.
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fixed various series points issues.
- Date: Tue, 1 Jun 2010 15:38:08 +0000 (UTC)
commit ae78cc4580141a7d7c8b1ea2999ab0036cc65e1d
Author: Jean Brefort <jean brefort normalesup org>
Date: Tue Jun 1 17:29:24 2010 +0200
Fixed various series points issues.
plugins/plot_barcol/gog-line.c | 6 +++++-
plugins/plot_radar/gog-radar.c | 18 ++++++++----------
plugins/plot_xy/gog-xy.c | 6 ++++--
3 files changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/plugins/plot_barcol/gog-line.c b/plugins/plot_barcol/gog-line.c
index eb9a591..f817bb9 100644
--- a/plugins/plot_barcol/gog-line.c
+++ b/plugins/plot_barcol/gog-line.c
@@ -705,8 +705,12 @@ gog_line_view_render (GogView *view, GogViewAllocation const *bbox)
for (j = 0; j < lengths[i]; j++) {
x = points[i][j].x;
y = points[i][j].y;
- if (isnan (y))
+ if (isnan (y)) {
+ if ((overrides != NULL) &&
+ (GOG_SERIES_ELEMENT (overrides->data)->index == j))
+ overrides = overrides->next;
continue;
+ }
gse = NULL;
if ((overrides != NULL) &&
(GOG_SERIES_ELEMENT (overrides->data)->index == j)) {
diff --git a/plugins/plot_radar/gog-radar.c b/plugins/plot_radar/gog-radar.c
index 78a24dc..e3d7315 100644
--- a/plugins/plot_radar/gog-radar.c
+++ b/plugins/plot_radar/gog-radar.c
@@ -919,16 +919,14 @@ gog_rt_view_render (GogView *view, GogViewAllocation const *bbox)
go_add_epsilon ((theta_max - theta_min)
- fmod (theta - theta_min, 2 * M_PI)) >= 0.0)) {
gse = NULL;
- if (overrides != NULL) {
- while (GOG_SERIES_ELEMENT (overrides->data)->index < count)
- overrides = overrides->next;
- if (GOG_SERIES_ELEMENT (overrides->data)->index == count) {
- gse = GOG_SERIES_ELEMENT (overrides->data);
- overrides = overrides->next;
- if (!is_map) {
- style = go_styled_object_get_style (GO_STYLED_OBJECT (gse));
- gog_renderer_push_style (view->renderer, style);
- }
+ while (overrides && GOG_SERIES_ELEMENT (overrides->data)->index < count)
+ overrides = overrides->next;
+ if (overrides && GOG_SERIES_ELEMENT (overrides->data)->index == count) {
+ gse = GOG_SERIES_ELEMENT (overrides->data);
+ overrides = overrides->next;
+ if (!is_map) {
+ style = go_styled_object_get_style (GO_STYLED_OBJECT (gse));
+ gog_renderer_push_style (view->renderer, style);
}
}
if (is_map) {
diff --git a/plugins/plot_xy/gog-xy.c b/plugins/plot_xy/gog-xy.c
index d66ca90..a8db7dd 100644
--- a/plugins/plot_xy/gog-xy.c
+++ b/plugins/plot_xy/gog-xy.c
@@ -1305,6 +1305,8 @@ gog_xy_view_render (GogView *view, GogViewAllocation const *bbox)
} else continue;
} else {
gse = NULL;
+ while (overrides && GOG_SERIES_ELEMENT (overrides->data)->index < i - 1)
+ overrides = overrides->next;
if ((overrides != NULL) &&
(GOG_SERIES_ELEMENT (overrides->data)->index == i - 1)) {
gse = GOG_SERIES_ELEMENT (overrides->data);
@@ -1352,7 +1354,7 @@ gog_xy_view_render (GogView *view, GogViewAllocation const *bbox)
y_margin_min <= y_canvas && y_canvas <= y_margin_max) {
markers[j][k].x = x_canvas;
markers[j][k].y = y_canvas;
- markers[j][k].index = i;
+ markers[j][k].index = i - 1;
if (is_map)
markers[j][k].color = (gog_axis_map_finite (z_map, z))?
get_map_color (gog_axis_map_to_view (z_map, z), hide_outliers):
@@ -1419,7 +1421,7 @@ gog_xy_view_render (GogView *view, GogViewAllocation const *bbox)
gog_series_get_xy_data (GOG_SERIES (series), &x_vals, &y_vals);
while (overrides != NULL) {
gse = GOG_SERIES_ELEMENT (overrides->data);
- x = x_vals ? x_vals[gse->index] : gse->index;
+ x = x_vals ? x_vals[gse->index] : gse->index + 1;
y = y_vals[gse->index];
if (gog_axis_map_finite (y_map, y) && gog_axis_map_finite (x_map, x)) {
style = go_styled_object_get_style (GO_STYLED_OBJECT (gse));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]