Bug 148166 - Chart is empty when using data ranges from another document and the current document is empty
Summary: Chart is empty when using data ranges from another document and the current d...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2022-03-24 20:07 UTC by Xisco Faulí
Modified: 2024-03-01 06:02 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2022-03-24 20:07:21 UTC
I found this issue while creating a unittest for tdf#122011

Steps to reproduce:
1. Create a new document in calc
2. Add some data to A1:A3
3. Save
4. Open a document
5. Insert - Chart
6. In Data Range add the reference to the other document ( e.g. 'file:///home/xisco/Descargas/Untitled 1.ods'#$Sheet1.$A$1:$A$3 )
7. Finish

-> The chart is empty

This issue is not reproducible if the current document contains some data. Repeat the steps before and add a number to any cell before inserting the chart. In this case the chart has data.

Reproduced in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 4a46a74a3de0ac7df5d3ce949dda5e809c1729ab
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded


and

Version: 6.4.0.0.alpha1+
Build ID: 9bc848cf0d301aa57eabcffa101a1cf87bad6470
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3; 
Locale: es-ES (es_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Xisco Faulí 2022-03-24 20:07:58 UTC
@Eike, since you fixed bug 122011, I thought you might be interested in this issue
Comment 2 m_a_riosv 2022-03-24 20:57:01 UTC
If I remember fine to have links between files working, you need to have saved both files first.
Comment 3 Timur 2022-03-25 11:20:20 UTC
I tried in Windows and chart was always empty, regardless if there was some data or if 2nd file was new or saved. I guess it's new. 
I enabled links after saving and message: "Automatic update of external links has been disabled".

I noticed that help https://help.libreoffice.org/latest/he/text/schart/01/wiz_data_range.html doesn't contain instructions how to use range from other file. So people ask: https://ask.libreoffice.org/t/how-to-refer-range-of-cells-from-other-libreoffice-excelsheet/21066/8
Comment 4 Stéphane Guillou (stragu) 2024-03-01 06:02:56 UTC
Following the steps, I see an empty chart, but it makes sense: because "First column as label" is ticked by default, the data range only provides labels, no actual data.

If you repeat the steps but untick "First column as label", you should see the chart.

libreoffice-6.3.3.2
libreoffice-6.4.0.0.alpha1

And a recent master build:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e2473fe3a547e5a11d3b91ab8ded833bf5b74356
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Xisco, can you please double-check?