Bug 151567 - Sparkline graph copy+paste copies the graph itself not the graphing formula
Summary: Sparkline graph copy+paste copies the graph itself not the graphing formula
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.2.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Sparklines
  Show dependency treegraph
 
Reported: 2022-10-16 15:04 UTC by fred4u
Modified: 2023-05-12 04:55 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Calc sparkline Copy/Paste issue (8.08 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-10-19 20:43 UTC, fred4u
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fred4u 2022-10-16 15:04:19 UTC
Description:
If using Sparkline to visualize series of data in rows, copy+paste does not provide updated graph.
Instead, only the previous graph is copied.
Expect that once will define a sparkline graph, copying and pasting the cell with sparkline will copy the formula(range, style) of graph which will be updated to new row of data. IMO this is the core of Sparkline (and why use it instead of standard graph).
This works in MS Excel.

Steps to Reproduce:
1. Enter series of data in matrix of rows and columns
2. Create a Sparkline graph for first row of data - see valid graph 
3. Copy/paste Sparkline graph to the following rows

Actual Results:
Sparkline graph itself is copied

Expected Results:
Expect to see updated graphs in next rows, that represent current data in each row.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: pl-PL (pl_PL); UI: pl-PL
Calc: threaded
Comment 1 m_a_riosv 2022-10-17 02:03:53 UTC
Please can you attach a sample file.
Comment 2 fred4u 2022-10-19 20:43:49 UTC
Created attachment 183148 [details]
Calc sparkline Copy/Paste issue

Example file to illustrate the issue.
To reproduce the problem, Copy the sparkline in D1 cell, and paste it to D2.
Expected: sparkline will update to 2nd row of data (4,3,2)
Actual: sparkline is copied graphically (representing the original image from the copied sparkline).
Comment 3 m_a_riosv 2022-10-20 00:51:48 UTC
The spark line range it's copied without take care if the range reference is relative.

Still happens with 
Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 5a1f41a0d3aab15c113651f2edc9d4137ae99063
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo
Comment 4 fred4u 2022-10-20 05:17:31 UTC
My tests show that it's not the range that is copied, but the graphics snapshot.
Im my test case, if someone will copy/paste sparkline from D1 to D2, both will look identical. Then if the Row1 data is changed, e.g. B1 from 3 to 1, the sparkline in D1 will be updated to reflect the change and it's copy from D2 will not. So it seems like sparkline copy in D2 lost it's data connection at all.
Comment 5 m_a_riosv 2022-10-20 13:37:48 UTC
(In reply to fred4u from comment #4)

If I copy the sparkline cell, one down, it copied with the same address.
You can see it with Right-click / Sparkline / Edit Sparkline

The copied doesn't update after change data on row-1 but if you do a Menu/Data/Calcuate/Recalculate hard, it is updated.

So the bug is that at copy, relative address are not updated.
And the copy needs a hard recalc.
Comment 6 m_a_riosv 2022-10-20 13:39:45 UTC
And after save and reopening the copy it's not there.