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 675913 - Graph picks up a header as a data point on the x axis
Graph picks up a header as a data point on the x axis
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Charting
1.10.x
Other Linux
: Normal normal
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2012-05-11 22:39 UTC by Penelope Fudd
Modified: 2012-05-14 06:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Spreadsheet with corrupt graph. (3.42 KB, application/x-gnumeric)
2012-05-11 22:39 UTC, Penelope Fudd
Details

Description Penelope Fudd 2012-05-11 22:39:24 UTC
Created attachment 213892 [details]
Spreadsheet with corrupt graph.

I'm generating a report on disk space on 20 computers.  The first row is a header.  I selected column A, then control-click column D then column C.  Then hit the graph button, and picked column, and the stacked variant, so I could stack the used on top of the free space.  I selected 'column 1 is a shared abscissa', rotated the x-axis labels, switched the y-axis to scientific notation, and hit 'insert'.  The resulting graph has a problem, as the first bar (the computer with the second-biggest disk) has the name 'name', when it should be 'shogun', the label to the right.  The fourth bar (the computer with the biggest disk) has the name 'shazam', but it should be 'shechinah'.

This has been reproduced twice, and I'm not sure how to *not* reproduce it...

See attached file.
Comment 1 Penelope Fudd 2012-05-11 22:49:00 UTC
Deleting the header fixes the labels.
Comment 2 Andreas J. Guelzow 2012-05-12 06:39:08 UTC
Well, your labels start at A1 while all the data starts at C2 and D2 resp. If you fix the label range foor your series, everything looks fine.
Comment 3 Penelope Fudd 2012-05-12 15:23:39 UTC
Yes, that's exactly the bit of data that is wrong.  I don't know why the graph tool is getting the wrong label range. I had selected all of column a, d and c by clicking on the column label, so i had expected the three columns to start at row 1.

Can you reproduce this?
Comment 4 Andreas J. Guelzow 2012-05-12 17:01:59 UTC
I can reproduce it. 

I think the underlying problem is that we recognize that columns C and D have a header, so we strip it off and use it as a name. The first cell of column A does not differ and so we don't recognize it as a header. Of course, once we have headers for C and D we should know that there must be a corresponding header for column A. 

I assume that Jean will look at this, he knows the code in question much better than I.
Comment 5 Jean Bréfort 2012-05-13 05:49:57 UTC
Seems this happens because a multiple selection is used. If the three columns are consecutive and you select all, the labels are correct.
Comment 6 Jean Bréfort 2012-05-14 06:27:25 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

We'll now consider the first cell of each vector as a header in case of multiple selections if at least one selected range has a header.