Bug 137691 - FILEOPEN: Data table is missing number formatting: shows "250000" instead of "$250,000"
Summary: FILEOPEN: Data table is missing number formatting: shows "250000" instead of ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:24.8.0 target:24.2.0.2
Keywords:
Depends on:
Blocks: OOXML-Chart
  Show dependency treegraph
 
Reported: 2020-10-22 22:32 UTC by Gerald Pfeifer
Modified: 2024-01-12 02:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document (PPTX with chart) (2.33 MB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2020-10-22 22:32 UTC, Gerald Pfeifer
Details
Side by side comparison of LibreOffice (left) and Office 365 (right) (263.75 KB, image/png)
2020-10-22 22:34 UTC, Gerald Pfeifer
Details
Screenshot with LO 7.5 as of 2022-10-05: shows data table, lacks number formatting (305.80 KB, image/png)
2022-10-05 10:41 UTC, Gerald Pfeifer
Details
chartlegendmissing-min.pptx: faster loading, shows more problems (48.73 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2024-01-05 15:44 UTC, Justin L
Details
chartlegendmissing-min.pdf: how it looks in PowerPoint 2010 (version used to minimize) (93.93 KB, application/pdf)
2024-01-05 15:45 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2020-10-22 22:32:02 UTC
Created attachment 166646 [details]
Sample document (PPTX with chart)

Compared to Powerpoint/Office 365, LibreOffice simply does not show a
legend for the chart on the sample slide and also misses the table with
data values.
Comment 1 Gerald Pfeifer 2020-10-22 22:34:27 UTC
Created attachment 166647 [details]
Side by side comparison of LibreOffice (left) and Office 365 (right)

Version: 7.1.0.0.alpha0+
Build ID: 86d4419c6c4961c8b473decccea99338c176ffe1
CPU threads: 8; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2020-10-21_08:38:05
Calc: threaded

...and also...

Version: 6.4.8.0.0+
Build ID: 99b065ec31d032fc08ab14f66430dac4fef904a5
CPU threads: 8; OS: Linux 5.8; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-6-4, Time: 2020-10-08_08:57:08
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Comment 2 Aron Budea 2020-10-25 09:36:38 UTC
Displaying data table together with the chart is a missing feature, and is tracked as bug 82218.

*** This bug has been marked as a duplicate of bug 82218 ***
Comment 3 Gerald Pfeifer 2022-10-05 10:40:34 UTC
(In reply to Aron Budea from comment #2)
> Displaying data table together with the chart is a missing feature, and is
> tracked as bug 82218.

The feature as such is done, alas this sample document does not fully
render properly yet: Specifically numbers are not formatted as they are
on the y-axis.

E.g. we see "250000" instead of "$250,000". both the currency symbol and
the "," are missing.

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: a36173359d4614a8935e2f764acadfcf736e091c
CPU threads: 8; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Comment 4 Gerald Pfeifer 2022-10-05 10:41:50 UTC
Created attachment 182840 [details]
Screenshot with LO 7.5 as of 2022-10-05: shows data table, lacks number formatting
Comment 5 Justin L 2024-01-03 15:22:00 UTC
(In reply to Gerald Pfeifer from comment #4)
> shows data table, lacks number formatting
Assuming lack of import support for
<c:formatCode>"$"#,##0_);[Red]\("$"#,##0\)</c:formatCode>
and
<c:formatCode>
_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"??_);_(@_)
</c:formatCode>

since LO exports as <c:formatCode>General</c:formatCode>

The data table first showed up with
LO 7.5 commit 6b481f8bb44a14ebbfe010476cf2ca3728e7d539
Author: Tomaž Vajngerl on Mon May 16 16:10:02 2022 +0900
    chart2: add DataTable to AxisProperties, take account at rendering
    
    The Diagram model has the DataTable class, but now we need to
    take this into account at rendering. First add the DataTable to
    AxisProperties, to decide if the data table should be rendered or
    not.
    
    Change-Id: Ia18fcffccc632e4d36011544066072ae3cdfbfc7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137152
Comment 6 Justin L 2024-01-03 16:14:10 UTC
(In reply to Justin L from comment #5)
> since LO exports as <c:formatCode>General</c:formatCode>

    // TODO: what format code?
    pFS->writeEscaped( "General" );
Comment 7 Justin L 2024-01-03 17:22:26 UTC
This LO 4.1 import should be helpful. It started to display the data table itself and the axis label contents using the numformat.
commit ac26b103af987f080ca14ad243033e5e0acda189
Author: Muthu Subramanian on Wed Sep 11 21:41:43 2013 +0530  
    n#834720: Labels wrongly interpreted as dates.
Comment 8 Justin L 2024-01-04 21:00:36 UTC
The XAxis is not getting the right nNumberFormatKey because
VSeriesPlotter::getLabelTextForValue hasExplicitNumberFormat is false because bLinkToSource is true.
Comment 9 Justin L 2024-01-05 15:04:47 UTC
Useful-looking 7.0 commit e57d90cd4e51a1353eafc87bb29cfe6076704a7c
Author: Balazs Varga on Tue Dec 10 12:53:08 2019 +0100
    tdf#129173 tdf#129175 Fix number format of data labels

    Note: Inherits the data series/point label format from the
    cell format and not the axis format, if we set the 'link to source data'
    option to true.
Comment 10 Justin L 2024-01-05 15:44:21 UTC
Created attachment 191778 [details]
chartlegendmissing-min.pptx: faster loading, shows more problems

The original attachment was VERY slow to load - probably because of so many different master pages and predefined layouts.

This one also shows a few more deficiencies in LO's implementation.
Specifically for this bug, it demonstrates that the data table itself is NOT getting the correct formatting, but was simply "borrowing" the axis formatting.

Banana should have the negative number showing the dollar sign inside ($123)
Pineapple should have the negative number showing the dollar sign outside $(123)
Comment 11 Justin L 2024-01-05 15:45:19 UTC
Created attachment 191779 [details]
chartlegendmissing-min.pdf: how it looks in PowerPoint 2010 (version used to minimize)
Comment 12 Commit Notification 2024-01-09 20:34:15 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0dd3df9400cebeb7cf24887a8640d07a3f9eb4b2

tdf#137691 chart2 import: provide NumberFormat to DataSeries

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2024-01-09 20:35:17 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0bf4338cfe406a0d527ac78ce76ff7dd3837df03

tdf#137691 chart2 export: preserve NumberFormat of DataSeries

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Xisco Faulí 2024-01-10 10:24:18 UTC
Verified in

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ef6ff2df2e1286974da2f344aa3b8e3ae9093a79
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 15 Commit Notification 2024-01-10 13:21:16 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/371a2245d61cc6f6a994bc2914fe73a5aaf08e18

tdf#137691 chart2 import: provide NumberFormat to DataSeries

It will be available in 24.2.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2024-01-10 13:21:19 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/0e016e3efbce8a6ef5d91e5ccf96f46d0b1a32cb

tdf#137691 chart2 export: preserve NumberFormat of DataSeries

It will be available in 24.2.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Justin L 2024-01-10 16:08:55 UTC
Some follow-up bugs
-bug 158773: slow load time since 7.6.3

-bug 142108: data series format lost when exporting to ODF format (which also can impact loading OOXML charts since sometimes they go through the export/import process while loading - like chart2/qa/extras/data/docx/testSeriesIdxOrder.docx

-bug 159109: sourceLinked now more possible for Axis (depends on bug 142108)