Bug 96469 - FILESAVE: Data Point Color in Charts lost on DOCX/XLSX export
Summary: FILESAVE: Data Point Color in Charts lost on DOCX/XLSX export
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: target:6.2.0 target:6.1.1 target:6.0.7
Keywords:
: 114161 (view as bug list)
Depends on:
Blocks: OOXML-Chart
  Show dependency treegraph
 
Reported: 2015-12-13 23:24 UTC by Luke
Modified: 2018-09-10 06:52 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
.ods file with chart to illustrate the issue (13.17 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-12-13 23:24 UTC, Luke
Details
a .docx file with chart to roundtrip (36.53 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-12-13 23:46 UTC, Luke
Details
a .xlsx file with chart to roundtrip (12.33 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2015-12-13 23:46 UTC, Luke
Details
Even simpler xlsx example that uses RGB color (12.30 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2015-12-14 01:59 UTC, Luke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2015-12-13 23:24:21 UTC
Created attachment 121281 [details]
.ods file with chart to illustrate the issue

Round-tripping an MS Office file with a chart or saving a LibreOffice file to OOXML with strip away the data point color.

Steps to reproduce:
1. In Writer or Calc, create a chart.
2. Edit Chart
3. Format Data Point -> Area -> Color
4. Select a different color than the series
5. Save as DOCX/XLSX
6. Close and reopen
Comment 1 Luke 2015-12-13 23:46:24 UTC
Created attachment 121282 [details]
a .docx file with chart to roundtrip
Comment 2 Luke 2015-12-13 23:46:56 UTC
Created attachment 121283 [details]
a .xlsx file with chart to roundtrip
Comment 3 Luke 2015-12-14 01:59:30 UTC
Created attachment 121286 [details]
Even simpler xlsx example that uses RGB color

The roundtripped file can be fixed by adding back the following code to xl\charts\chart1.xml

<c:idx val="0"/><c:spPr><a:solidFill><a:srgbClr val="FF0000"/></a:solidFill><a:ln><a:noFill/></a:ln><a:effectLst/></c:spPr></c:dPt>




attachment 121283 [details] uses scheme colors and fixed by adding back the following code to xl\charts\chart1.xml

<a:solidFill><a:schemeClr val="bg1"/></a:solidFill><a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="tx1"><a:lumMod val="15000"/><a:lumOff val="85000"/></a:schemeClr></a:solidFill><a:round/></a:ln><a:effectLst/>
Comment 4 Buovjaga 2015-12-17 09:34:53 UTC
Reproduced.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: 014633f83e44ae8ba33087b6f38e8e253e281969
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-12-15_06:21:44
Locale: fi-FI (fi_FI)
Comment 5 Buovjaga 2016-03-13 16:17:17 UTC
*** Bug 98497 has been marked as a duplicate of this bug. ***
Comment 6 QA Administrators 2017-05-22 13:19:28 UTC Comment hidden (obsolete)
Comment 7 Jacques Guilleron 2017-11-30 10:37:56 UTC
*** Bug 114161 has been marked as a duplicate of this bug. ***
Comment 8 Luke 2018-05-20 13:39:52 UTC
Still repo in Version: 6.1.0.0.alpha1+
Build ID: 8010f473c77b9f384a7067f487bc24469f8c0cd3

Bartosz,
You've made similar fixes in this area. Is this something you could take a look at?
Comment 9 Bartosz 2018-05-23 11:48:57 UTC
Confirmed that there is missing Data Point field in attachment 121286 [details]:
http://www.datypic.com/sc/ooxml/e-draw-chart_dPt-1.html

After adding Data Point field:
                    <c:dPt>
                        <c:idx val="0"/>
                        <c:invertIfNegative val="0"/>
                        <c:bubble3D val="0"/>
                        <c:spPr>
                            <a:solidFill>
                                <a:srgbClr val="FF0000"/>
                            </a:solidFill>
                            <a:ln>
                                <a:noFill/>
                            </a:ln>
                            <a:effectLst/>
                        </c:spPr>
                    </c:dPt>

into xl\charts\chart1.xml, it's working perfectly fine.
Comment 10 Bartosz 2018-05-23 11:52:34 UTC
The code responsible for export Data Points is available at:
https://github.com/LibreOffice/core/blob/master/oox/source/export/chartexport.cxx#L3247
Comment 11 Commit Notification 2018-08-10 05:06:51 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c958f52b813d34baa9b5236bb34a08a04e6b0aba

tdf#96469 Export Data Point properties in Charts on DOCX/XLSX

It will be available in 6.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2018-08-10 13:38:11 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=15035b98dc694bde4c4073fa75bdd2ce9d7e6670&h=libreoffice-6-1

tdf#96469 Export Data Point properties in Charts on DOCX/XLSX

It will be available in 6.1.1.

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

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2018-08-28 18:26:12 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6fa9aaaa5dca4d6b79698b55a2f2c956c99c3482&h=libreoffice-6-0

tdf#96469 Export Data Point properties in Charts on DOCX/XLSX

It will be available in 6.0.7.

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

Affected users are encouraged to test the fix and report feedback.
Comment 14 Luke 2018-09-09 23:49:03 UTC
Balazs Varga,
Thank you so much for fixing this bug. It's an issue I've observed in multiple docs in the wild. Is there a reason you have left this issue open as traditionally a the developer closes it when he feels it's done. 

Verified fixed in Version: 6.2.0.0.alpha0+ (x64)
Build ID: dff829e863fd05bedd5bcb713cd80c10fa582932