After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 628721 - strange series names behaviour
strange series names behaviour
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Charting
git master
Other Linux
: Urgent blocker
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2010-09-03 17:20 UTC by Andreas J. Guelzow
Modified: 2010-09-04 16:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Graph with date axis (2.79 KB, application/gnumeric)
2010-09-04 13:55 UTC, Morten Welinder
  Details
Proposed patch (1.07 KB, patch)
2010-09-04 15:23 UTC, Jean Bréfort
committed Details | Review

Description Andreas J. Guelzow 2010-09-03 17:20:36 UTC
open samples/chart-tests.gnumeric
go to the lines page
select the second plot inthe first column
open the properties dialog
Under PlotLine1 you should see 5 series wit names such as "solid"
select any one of those series,
the name changes to "0"!

This surely should not happen.
Comment 1 Jean Bréfort 2010-09-03 21:44:17 UTC
Oops, this is quite recent. Might be related to #627514, but this field is scalar, not vectorial.
Comment 2 Jean Bréfort 2010-09-04 05:43:22 UTC
Raising the priority since this seems quite serious.
Comment 3 Jean Bréfort 2010-09-04 08:13:39 UTC
Seems the issue comes from	Graphs: fix problems with date axes.	Morten Welinder

diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index fa77e60..1789cf5 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -5362,13 +5362,19 @@ cb_graph_dim_entry_changed (GraphDimEditor *editor)
static void
set_entry_contents (GnmExprEntry *entry, GOData *val)
{
- SheetControlGUI *scg = gnm_expr_entry_get_scg (entry);
- Sheet const *sheet = scg_sheet (scg);
- char *txt;
-
- txt = go_data_serialize (val, (gpointer)sheet->convs);
- gnm_expr_entry_load_from_text (entry, txt);
- g_free (txt);
+ if (go_data_get_n_dimensions (val) == 0 &&
+ go_data_get_n_values (val) == 1) {
+ double d = go_data_get_scalar_value (val);
+ GODateConventions const *date_conv = go_data_date_conv (val);
+ gog_data_editor_set_value_double (GOG_DATA_EDITOR (entry),
+ d, date_conv);
+ } else {
+ SheetControlGUI *scg = gnm_expr_entry_get_scg (entry);
+ Sheet const *sheet = scg_sheet (scg);
+ char *txt = go_data_serialize (val, (gpointer)sheet->convs);
+ gnm_expr_entry_load_from_text (entry, txt);
+ g_free (txt);
+ }
}
static void


Scalar values are now converted to a double whatever is inside. This is a serious regression.
Comment 4 Jean Bréfort 2010-09-04 08:29:27 UTC
Reverting above patch makes things work again, but probably breaks what it was introduced for.
Comment 5 Morten Welinder 2010-09-04 12:23:26 UTC
Can we test if a godata contains a number?

Anyway, why is this function being called for an element in the tree?
I thought editors were for things like axes limits only.
Comment 6 Morten Welinder 2010-09-04 12:35:35 UTC
For the record, we need this because converting to strings using 
go_data_serialize loses the format.  (And probably accuracy.)
Comment 7 Jean Bréfort 2010-09-04 12:42:12 UTC
There is no general way to test what a GOData contains AFAIK.
Editors are used for all instances of GOData used in the graph tree.
Comment 8 Jean Bréfort 2010-09-04 12:45:42 UTC
Morten, I really don't see the necessity for this change, can you provide a sample?
Comment 9 Morten Welinder 2010-09-04 13:55:26 UTC
Created attachment 169489 [details]
Graph with date axis

On the x-axis property page, change maximum to automatic and
notice that the minimum date changes to 34567 or some such.

go_data_serialize was never meant to human consumption.
Comment 10 Jean Bréfort 2010-09-04 14:05:12 UTC
OK, we can have either GOData from do-data-simple.c (something I find not a good idea in gnumeric) or GnmGOData. Formatting only makes sense for the second case.
Comment 11 Jean Bréfort 2010-09-04 15:23:30 UTC
Created attachment 169491 [details] [review]
Proposed patch

Seems this will fix the issue.
Comment 12 Morten Welinder 2010-09-04 16:38:01 UTC
Comment on attachment 169491 [details] [review]
Proposed patch

Looks good.
Comment 13 Jean Bréfort 2010-09-04 16:50:56 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.