Bug 165742 - Chartex charts are lost on input from OOXML and re-export
Summary: Chartex charts are lost on input from OOXML and re-export
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: kurt.nordback@protonmail.com
URL:
Whiteboard: target:25.8.0
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-14 15:46 UTC by kurt.nordback@protonmail.com
Modified: 2025-04-22 12:39 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example file containing a chartex chart (12.74 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2025-03-14 15:47 UTC, kurt.nordback@protonmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kurt.nordback@protonmail.com 2025-03-14 15:46:07 UTC
Description:
LO currently has no support for charts in the chartex schema (cx namespace):
https://learn.microsoft.com/en-us/openspecs/office_standards/ms-odrawxml/e2723b0a-9120-42a5-bd11-c252ccb13c1e
This means that files containing such charts do not round-trip from/to OOXML properly: the chartex charts get lost.

Steps to Reproduce:
1. In MSO 2016 or later, create a "new" chart (boxWhisker, clusteredColumn, funnel, paretoLine, etc.).
2. Save to OOXML. (Or use the attached funnel.xlsx)
3. Import the file to LO. The chart is not rendered, though the diagram frame appears.
4. Export from LO to OOXML.
5. Open the exported file in MSO.

Actual Results:
The chart does not display in MSO.

Expected Results:
The chart displays properly in MSO.


Reproducible: Always


User Profile Reset: No

Additional Info:
This bug is only intended to capture the import/export part of chartex support. Full support in LO would also include rendering and UI, which would be an additional large task.
Comment 1 kurt.nordback@protonmail.com 2025-03-14 15:47:18 UTC
Created attachment 199812 [details]
Example file containing a chartex chart
Comment 2 kurt.nordback@protonmail.com 2025-03-14 16:23:28 UTC
Proposed steps for fixing/adding enhancement:

1. Introduce the chartex namespace in the parse and export code.
2. Create a ChartType derived class for one of the "simple" chartex charts (and maybe also a ChartTypeTemplate derived class?).
3. Implement a narrow pathway for parsing for the "simple" type chosen above. It could start with just the inner ST_SeriesLayout value, which carries the chart type. (But there is a lot of higher-level parser work required to get to that.)
4. Implement a narrow pathway for export of the one type. It's unclear at this point just how narrow this could be (i.e., how little content is required in the output file) in order for MSO to load it.
5. Widen these pathways to other chart types besides regionMap, which is much more complicated. Also widen to support all the peripheral chart content (title, legend, axes, etc.), which is the much larger task.
6. If desired, also implement import/export for regionMap. regionMap displays data associated with geography (i.e., a map). MSO renders most or all regionMaps remotely, on a server, in part because it requires access to a potentially vast amount of map data. It may or may not be practical for LO to support rendering of regionMap. Even import/export of regionMap is vastly more complicated than for the other chartex types, because of all the associated parameters and specification data.
Comment 3 m_a_riosv 2025-03-15 01:44:24 UTC
Reproducible
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bff3d755c8c11721054f4ff40a3d5f723b0c6b96
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-GB
Calc: CL threaded
Comment 4 Commit Notification 2025-04-02 04:26:03 UTC
knordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a0dd9ce966ca0b027262bdd077198973314efcf0

tdf#165742 Step 1: Introduce chartex namespace in parser and export

It will be available in 25.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 5 Commit Notification 2025-04-17 09:01:48 UTC
knordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/abc8ea2da28b17a4a4784830fe74fd2743f8a131

tdf#165742 Step 2: Create a ChartType derived class for chartex funnel chart.

It will be available in 25.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 6 Commit Notification 2025-04-22 12:39:30 UTC
knordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/84d4a5dc218bf2cef908c614efb7f09c821ae00c

tdf#165742 Step 3: Establish a narrow input path for chartex

It will be available in 25.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.