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 684192 - data addresses for charts should, by default, not include the sheet name
data addresses for charts should, by default, not include the sheet name
Status: RESOLVED OBSOLETE
Product: Gnumeric
Classification: Applications
Component: Charting
git master
Other Linux
: Normal normal
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2012-09-17 09:26 UTC by Frédéric Parrenin
Modified: 2018-05-22 13:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Frédéric Parrenin 2012-09-17 09:26:06 UTC
Steps to reproduce:
- create a simple sheet with formulas and a chart, e.g.
A1 1
A2 2
B1 2
B2 4
C1 =B1
C2 =B2
and an XY plot with X=A1:A2 Y=C1:C2
- select all the cells and copy to another workbook
=> the references in C1:C2 are still relative, but the references in the chart are absolute
Comment 1 Andreas J. Guelzow 2012-09-17 13:34:51 UTC
Are you sure that the references in the original chart are relative? (I believe that addresses in charts are always absolute since it would be strange if moving the chart by a few pixels would change the data that is being used.)
Comment 2 Frédéric Parrenin 2012-09-17 14:52:38 UTC
Charts should be relative to the sheet in which they are, not to the cell they are anchored to.
Not that this problem also exists when copying to another sheet.
Comment 3 Andreas J. Guelzow 2012-09-17 15:01:34 UTC
So I take you are not talking about relative versus absolute addressing but about whether the sheet is specified.

I still do not see how this is related to copying. It is my understanding that any address in the original chart already includes a sheet name.
Comment 4 Jean Bréfort 2012-09-18 07:14:35 UTC
Data references in charts are absolute by design. This include cells, of course, but also the sheet, and even the workbook.
Comment 5 Frédéric Parrenin 2012-09-18 08:59:04 UTC
Is this not misleading?
Imagine that you copy an entire sheet with charts and paste it in another sheet.
You may think the chart are linked to the copy but they are actually linked to the original data.
I think ideally we should be able to place '$' in the references, as we do in the cells formulas. What do you think?
Comment 6 Andreas J. Guelzow 2012-09-19 15:04:53 UTC
You create a graph attached to some data. If you move the graph on the sheet it should stay attached to the same data everything else would be surprising. So the addressing should definitely be absolute (as it is).

Copying a chart is really the same. I believe must users that copy-paste a chart would not expect it to suddenly pick data from a different sheet.

Bow there may be a reason why we would wan to be able to clone a chart onto a different sheet, but copy paste surely should not change the data attachment.
Comment 7 Andreas J. Guelzow 2012-09-19 15:05:57 UTC
Re comment #5: If you duplicate a sheet the references should probably remain to the current sheet, but copy paste ought to act on the individual portions.
Comment 8 Tobias Mueller 2013-01-26 18:33:31 UTC
reopening as the information requested in comment 1 has been provided.
Comment 9 Andreas J. Guelzow 2013-01-27 17:18:50 UTC
To recapture, data addresses stored in a graph should  be:

1) absolute addresses
2) by default do not specify a sheet name

We are already doing (1) but not (2).
Comment 10 Jean Bréfort 2013-01-29 07:05:43 UTC
Not sure it is a good idea. When I copy a chart, I expect that the new chart uses the same data.
Templates like what is requested in #645479 would be more meaningful, IMHO.
Comment 11 Frédéric Parrenin 2013-01-29 12:37:05 UTC
I don't understand why chart references do not work the same way as formula references: currently, it is not possible to have a reference relative to the sheet. 
If references relative to the sheet would be implemented, it would be up to the user to decide if, when he copies a chart, he wants the charts to be plugged to the same data in the former sheet or to the same places in the current sheet.
The default could be to have absolute reference to the sheet if you believe it is the most commonly wanted action.
Comment 12 Jean Bréfort 2013-01-29 13:25:19 UTC
Graphs are floating objects. Relative addresses are meaningless. Of course, relative sheet might have but they are not supported, the framework would need large changes just for that.

The right way to go, in my opinion, is to implement graph templates as requested in #645479 (which is not really a duplicate of #629646). Such templates should have no sheet reference.
We need tow things: create a template from an existing graph and the ability to create a new graph from a template. Both things are not trivial but seem possible.
Comment 13 Andreas J. Guelzow 2013-01-29 17:19:26 UTC
Jean I don't see why an address like $A$1:$B$100 should require any framework changes. We do allow such address everywhere else" $A$1:$B$100 on the current sheet.

Of course we would not be able to have those used in graphs that are on a graph sheet. Which is probably reason to specify the sheet by default. But why can't we allow the omission of the sheet?
Comment 14 Jean Bréfort 2013-02-05 13:21:34 UTC
As far as I understand things, the way charts are saved automatically adds the sheet name.
Note that graph sheets do have cells, just they are not visible.
Comment 15 GNOME Infrastructure Team 2018-05-22 13:53:31 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnumeric/issues/196.