GNOME Bugzilla – Bug 675913
Graph picks up a header as a data point on the x axis
Last modified: 2012-05-14 06:27:25 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.
Deleting the header fixes the labels.
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.
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?
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.
Seems this happens because a multiple selection is used. If the three columns are consecutive and you select all, the labels are correct.
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.