Bug 287445

Summary: Not all text displayed in the legend of a chart
Product: [Applications] calligrasheets Reporter: swathi <swathi.vegesna999>
Component: filter/xlsAssignee: Calligra Sheets (KSpread) Bugs <calligra-sheets-bugs-null>
Status: REOPENED ---    
Severity: normal CC: sebsauer
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Test data
Screenshot in MS Office
Screenshot in Calligra Tables
Screenshot in Latest Calligra Tables

Description swathi 2011-11-24 10:06:54 UTC
Created attachment 66030 [details]
Test data

Version: git checkout b4dd97fa3be997349eddbf431cc90319b6de3c25
      (Using KDE 4.6.3)                
     OS: Kubuntu 11.04
Test data is in Excel 2003 format.
Open the same document in Calligra Tables. 
Check the display of the words in the legend of the chart.

Expected outcome:
Words and Symbols in the legend should be displayed properly.

Actual outcome:
Extra space is introduced between the words  and the symbols in the legend.
Please check the screenshots attached.

Frequency:
Always
Comment 1 swathi 2011-11-24 10:07:43 UTC
Created attachment 66032 [details]
Screenshot in MS Office
Comment 2 swathi 2011-11-24 10:08:37 UTC
Created attachment 66033 [details]
Screenshot in Calligra Tables
Comment 3 Sebastian Sauer 2011-11-25 14:34:56 UTC
Fixed with 12ba15d6746d.
Comment 4 swathi 2011-12-01 08:06:00 UTC
Tested with 5992551fa6b6bf4e2d716728e086fd48ff905e33,
No extra space is introduced but The entire text in the legend is not displaying.
Ex:If the original file has "Hospitals Endoscopy" in Calligra Tables only "Endoscopy" is displaying in the legend.
So reopening the bug.
Comment 5 swathi 2011-12-01 08:06:45 UTC
Created attachment 66246 [details]
Screenshot in Latest Calligra Tables
Comment 6 Sebastian Sauer 2011-12-01 11:22:39 UTC
Cannot reproduce. Even your screenshots shows that Calligra Tables displays "Hospitals Endoscopy" in the legend (two words!) and not only "Endoscopy".
Comment 7 Sebastian Sauer 2011-12-01 14:26:45 UTC
Ah, here is the case;

Excel displays the legend items;
* Hospitals Sigmoidoscopy
* Hospitals Colonoscopy
* Hospitals Endoscopy
* Hospitals Carotid

While OpenOffice.org/LibreOffice Calc and Calligra Tables display 
* Hospitals Sigmoidoscopy
* Colonoscopy
* Endoscopy
* Carotid

The defined series are;
* C6:C7
* D6:D7
* E6:E7
* E6:E7

At C6 is the "Hospitals" string. So, somehow the logic excel applies here to put together the string that is displayed for a legend item is;
1. Loop at given cell range (e.g. D6:D7) from bottom-up
2. If at the given rows above is no content then go in the same row above us to the left till column A *xor* content is reached. If content is found add that to the resulting label.
3. Reset to our column and move one row up and continue at 2.

There opens quit a lot questions.
* We cannot do that in ODF to be compatible with OO.org/LO which does it like us atm.
* We could introduce the boolean flag MsOfficeLikeLegendLabelRange into the settings.xml. If TRUE then we do what Excel does. If FALSE we do it in the Openoffice/LibreOffice way.
* Best way would be to figure out a solution to handle all that direct in the Excel 2000/2003/2007 filters and only there. For example by allowing custom string labels per legend-item stored in the internal data cache (aka "local-table" in the Chart1/content.xml). Afaik that is not supported by ODF and in any case it's not by the plugin-shape either.

All in all not an easy task.
Comment 8 Sebastian Sauer 2011-12-06 01:53:15 UTC
Changed summary from "Extra space is introduced between the symbols and words in the legend of the bar chart" (which was fixed) to "Not all text displayed in the legend of a chart" (what is the remaining issue described at comment #7 ).
Comment 9 Justin Zobel 2021-03-09 22:43:42 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.