Bug 91729 - Can't modify the legend of a chart series
Summary: Can't modify the legend of a chart series
Status: RESOLVED DUPLICATE of bug 82298
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
3.5.7.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 147502 (view as bug list)
Depends on:
Blocks: Chart-Data
  Show dependency treegraph
 
Reported: 2015-05-29 20:36 UTC by Francisco
Modified: 2022-11-18 11:07 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT file with problematic chart (41.30 KB, application/vnd.oasis.opendocument.text)
2015-05-29 20:36 UTC, Francisco
Details
source ODS file (40.00 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-04-01 20:52 UTC, Francisco
Details
product ODT file (19.52 KB, application/vnd.oasis.opendocument.text)
2018-04-01 20:52 UTC, Francisco
Details
File with removed list element (19.92 KB, application/vnd.oasis.opendocument.text)
2022-02-18 22:53 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francisco 2015-05-29 20:36:01 UTC
Created attachment 116154 [details]
ODT file with problematic chart

This is one of the weirdest bugs I've found.

I simply can't update the name of a series in a chart inserted in Writer. I'm attaching the problematic file.


Steps:
1) Open the attached ODT file.
2) Activate the first chart (titled 313 K).
3) Enter into edit data mode through "Right click" -> "Data table".
4) Try to modify the name of the last series (the blue one)

Result:
The final name of the series always ends with "313.15 K Li (1981)", no matter what.

Expected:
Any component of a series should be modifiable.


Additional comments:
I've tested the following LibO versions, under Kubunu 14.04, x86_64:
3.5.7
4.3.7
4.4.3
5.0.0b1
Comment 1 Francisco 2015-05-29 20:56:15 UTC
Additional comments:

A) Both charts were created in Calc, and then pasted into Writer.

B) Saving the file as FODT shows the following strings in the file:

For the first chart (titled 313 K):
            <table:table-row>
             <table:table-cell office:value-type="string">
              <text:p>sdfaksdjjfnaskdljfna .d 313.15 K Li (1981)</text:p>
              <text:list>
               <text:list-item>
                <text:p>sdfaksdjjfnaskdljfna .d</text:p>
               </text:list-item>
               <text:list-item>
                <text:p>313.15 K</text:p>
               </text:list-item>
               <text:list-item>
                <text:p>Li (1981)</text:p>
               </text:list-item>
              </text:list>
             </table:table-cell>

For the second chart (titled 353 K)
             <table:table-cell office:value-type="string">
              <text:p>n-Hexane 313.15 K Li (1981)</text:p>
              <text:list>
               <text:list-item>
                <text:p>n-Hexane</text:p>
               </text:list-item>
               <text:list-item>
                <text:p>313.15 K</text:p>
               </text:list-item>
               <text:list-item>
                <text:p>Li (1981)</text:p>
               </text:list-item>
              </text:list>
             </table:table-cell>

Erasing the content of "<text:list>" of both charts seems to solve the problem.
Comment 2 tommy27 2015-05-30 04:54:43 UTC
confirmed under Win8x64 using LibO 4.4.1
Comment 3 QA Administrators 2016-09-20 09:46:04 UTC Comment hidden (obsolete)
Comment 4 Francisco 2016-09-20 12:50:03 UTC
The bug is still present in 

Versión: 5.2.1.2
Id. de compilación: 1:5.2.1~rc2-0ubuntu1~trusty0
Subprocesos de CPU: 4; Versión de SO: Linux 3.13; Renderizado de IU: predeterminado; 
Configuración regional: en-US (es_AR.UTF-8); Calc: group

Some additional comments:

It's not possible to delete the "313.15 K Li (1981)" text on the last series. Moreover, it's possible to multiply the amount of "313.15 K Li (1981)" strings.

Steps:
1) Enter in the edit mode of the first chart.
2) Go to the "data table" window via right click.
3) Erase the string "sdfaksdjjfnaskdljfna .d " in the thrid series name, and exit:

Result: the amount of "313.15 K Li (1981)" string is 2 now.

4) Enter again in the data table window, and add some text at the begining of the series name. Exit the window
5) Enter again, and erase the new text.

Result: now, the amount of ""313.15 K Li (1981)" string is  3.
Comment 5 Xisco Faulí 2017-09-29 08:49:59 UTC Comment hidden (obsolete)
Comment 6 Regina Henschel 2018-04-01 12:50:42 UTC
The reason is indeed the list in the local table cell. How was this created? I cannot produce such file.

If I resave the file in strict ODF 1.2, I get the assertion
Program:c:\LO_build64\core\instdir\program\xolo.dll
File:c:/LO_build64/core/xmloff/source/nmspmap.cxx
Line: 264
Expression: false

I have used Version: 6.1.0.0.alpha0+ (x64)
Build ID: 0d06d1d16775fde3b0b34f3374907e07cbba763d
CPU threads: 8; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: CL

A list is allowed formally in a table cell and works for an external table like a writer table. For an legend item only a paragraph is allowed. If a local table is generated for example while performing a copy&paste operation, the content of the paragraphs from the table cell are connected with a &#x0d; character to get a single paragraph, which is used in the local table cell. I guess, that the same trick is used for displaying the legend item in case of an external table.

So yes, the error still exists.
Comment 7 Francisco 2018-04-01 20:52:12 UTC
Created attachment 141012 [details]
source ODS file
Comment 8 Francisco 2018-04-01 20:52:42 UTC
Created attachment 141013 [details]
product ODT file
Comment 9 Francisco 2018-04-01 20:53:00 UTC
(In reply to Regina Henschel from comment #6)
> The reason is indeed the list in the local table cell. How was this created?
> I cannot produce such file.

Hi Regina, I created that file in Calc, selecting to adjacent cells to create the legend. I don't have the original Calc file so I created a new one, from a similar work, which I'm attaching, together with a new ODT file.

Within the ODS file, there is a scatter chart with 3 series. The first is named "Gui et al. (2006) CO2+Et2Scc285.19 K" and it's referenced to cell A9. The 2nd and 3rd series are called "TEMPERATURE= 285.19 K" and they are referenced to cell range $J$3:$L$3.

The ODT file has the very same chart pasted from Calc. If you activate the chart mode, and open the data table you should be able to modify without a problem the name of the first series, but not the other two. For these, the string "285.19 K" remains appended at the end of the name.
Comment 10 QA Administrators 2019-04-02 02:49:07 UTC Comment hidden (obsolete)
Comment 11 Regina Henschel 2019-04-02 12:37:05 UTC
I can alter the name of the data series in the embedded table and thereby the legend in the chart in the text document.

Tested with Version: 6.3.0.0.alpha0+ (x64)
Build ID: 5cb2db6dd7d234a610a6501668a9901af8472b7f
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded
Comment 12 Francisco 2022-02-18 17:32:11 UTC
(In reply to Regina Henschel from comment #11)
> I can alter the name of the data series in the embedded table and thereby
> the legend in the chart in the text document.
> 
> Tested with Version: 6.3.0.0.alpha0+ (x64)
> Build ID: 5cb2db6dd7d234a610a6501668a9901af8472b7f
> CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
> Locale: de-DE (en_US); UI-Language: en-US
> Calc: threaded

Actually... the bug is still present in LibO 7.2.5
Comment 13 Francisco 2022-02-18 17:33:19 UTC
*** Bug 147502 has been marked as a duplicate of this bug. ***
Comment 14 Francisco 2022-02-18 17:41:04 UTC
1) Open "product ODT file" (3rd attachment).
2) Activate the chart
3) Open the Data table
4) Modify 2nd or 3rd series name ("TEMPERATURE = 285.19 K") into anything completely different. 

Result
The string "285.19 K" is concatenated at the end of the new name.

Expected:
No trace of original name should be there
Comment 15 Regina Henschel 2022-02-18 22:53:37 UTC
Created attachment 178388 [details]
File with removed list element

The file 'product ODF file' contains a <text:list> element in the internal <table:table> element, that shouldn't be there. In my attachment I have removed this element and the so repaired file behaves as expected. You can rename the date series without problems.

Indeed it is not possible to rename the data series in the file 'product ODF file'. How was the chart in that file created?
Comment 16 Regina Henschel 2022-02-18 22:55:46 UTC
(In reply to Regina Henschel from comment #15)
 How was the chart in that file created?

Please excuse me, you have already described how to create the file.
Comment 17 Regina Henschel 2022-02-19 00:43:51 UTC
The list was introduced with project "chartmultiline" 2009/2010. Some information are in https://bz.apache.org/ooo/show_bug.cgi?id=82971. The commits can be found with search for "chartmultline" in commit messages.

I do not have such old build to investigate, whether the problem with labels from multiple cells in local tables exists from the beginning or has been introduced later. My oldest version is 3.5.1.2 and there the error already exists.
Comment 18 Francisco 2022-02-19 02:33:44 UTC
Hi, Regina,

> Please excuse me, you have already described how to create the file.

Yes, it's the ODS file. In my use case, it's common that a name of a series may be distributed over different cells in a row. 


(In reply to Regina Henschel from comment #17)
> The list was introduced with project "chartmultiline" 2009/2010. Some
> information are in https://bz.apache.org/ooo/show_bug.cgi?id=82971. The
> commits can be found with search for "chartmultline" in commit messages.
> 
> I do not have such old build to investigate, whether the problem with labels
> from multiple cells in local tables exists from the beginning or has been
> introduced later. My oldest version is 3.5.1.2 and there the error already
> exists.

So, this may be actually inhereted from OOo? Or the solution to that bug generated this?
Comment 19 Stéphane Guillou (stragu) 2022-11-18 11:07:23 UTC

*** This bug has been marked as a duplicate of bug 82298 ***