Bug 50934 - Add a pie-with-remainder-as-another-pie chart type
Summary: Add a pie-with-remainder-as-another-pie chart type
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: kurt.nordback@protonmail.com
URL: https://ask.libreoffice.org/t/how-can...
Whiteboard: target:24.8.0 inReleaseNotes:24.8
Keywords:
: 114276 114277 156222 (view as bug list)
Depends on:
Blocks: OOXML-Chart Additional-Chart-Types Pie-and-Donut
  Show dependency treegraph
 
Reported: 2012-06-10 06:31 UTC by gekapes
Modified: 2024-10-15 21:06 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple test case for bar-of-pie, also referenced below (19.62 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2024-01-04 17:35 UTC, kurt.nordback@protonmail.com
Details
Simple pie-of-pie test (10.40 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2024-01-28 23:08 UTC, kurt.nordback@protonmail.com
Details
pie-of-pie.xlsx as rendered on Excel 2010 (86.67 KB, image/png)
2024-01-28 23:08 UTC, kurt.nordback@protonmail.com
Details
Simple bar-of-pie test (10.40 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2024-01-28 23:09 UTC, kurt.nordback@protonmail.com
Details
bar-of-pie.xlsx as rendered on Excel 2010 (84.63 KB, image/png)
2024-01-28 23:10 UTC, kurt.nordback@protonmail.com
Details
pie-of-pie.xlsx as rendered by this patch (79.61 KB, image/png)
2024-01-28 23:12 UTC, kurt.nordback@protonmail.com
Details
bar-of-pie.xlsx as rendered by this patch (75.15 KB, image/png)
2024-01-28 23:13 UTC, kurt.nordback@protonmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gekapes 2012-06-10 06:31:11 UTC
There is a critical missing type of chart in LibreOffice: pie of pie and related to it bar of a pie. This type of charts is presented in MS Office and is often necessary to show specific statistics.
Example of such chart in MS Office 2003 (is also present in newer versions):
http://office.microsoft.com/en-us/excel-help/creating-pie-of-pie-and-bar-of-pie-charts-HA001117937.aspx?CTT=5&origin=HA001034607

I am using Libre Office on Kubuntu and do not know, if this type of chart is presented in other versions of Libreoffice or in Openoffice.

I am writing my thesis and this type of chart is necessary for me, so I had to ask my friend to do it for me in MS Office. Such major functions are big barriers to use Libreoffice and Linux in general.

Thank you in advance!
Comment 1 A (Andy) 2012-12-25 11:37:41 UTC
reproducible with LO 3.6.4.3. (Win7 Home, 64bit)

This chart type is missing and I also need this chart type quite often.  Of course, this is no real bug, but it would really be good to add this to LO, because this minimizes the applications of LO.
Comment 2 Owen Genat (retired) 2014-08-29 02:06:39 UTC
Clarified summary so that all enhancement requests relating to chart types are readily findable.
Comment 3 Gabor Kelemen (allotropia) 2018-12-11 13:20:11 UTC
*** Bug 114277 has been marked as a duplicate of this bug. ***
Comment 4 Gabor Kelemen (allotropia) 2018-12-11 13:20:20 UTC
*** Bug 114276 has been marked as a duplicate of this bug. ***
Comment 5 Gabor Kelemen (allotropia) 2023-07-10 19:30:57 UTC
*** Bug 156222 has been marked as a duplicate of this bug. ***
Comment 6 Stéphane Guillou (stragu) 2023-07-11 09:55:11 UTC
An example xlsx created in Excel 2013 from duplicate bug 114276: attachment 138234 [details]

What it looks like, Excel vs LO: attachment 138237 [details]

Still not supported in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 77fca616e0bd79e0b405fd0b3543cf8e94e15df3
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 7 kurt.nordback@protonmail.com 2024-01-04 17:31:46 UTC
I've submitted a partial fix for this bug here: https://gerrit.libreoffice.org/c/core/+/160742

This patch set implements basic pie-of-pie and bar-of-pie capabilities, including OOXML import/export and basic rendering. It's awaiting review. Here are some areas that I believe still need work:

1.    ODF import/export. It appears to me that this would require changing the ODF spec, and I don't know the process for this.
2.    Review of my UI choices. For instance, I added pie-of-pie and bar-of-pie as subtypes of pie in the chart selection matrix (widening it to 6 columns). It might be preferable to keep of-pie as a different chart type (adding a row instead of two columns). I also made arbitrary decisions about sizes and separation of the two chart parts in the rendering.
3.    In the selection matrix above I added placeholder graphics, but graphics that look like the others will be needed. I don't know how to produce those.
4.    Lots more unit tests. I held off on those pending any input on (2) above, which could affect many parameters in the tests.
5.    There are many options in OOXML/MS Office that could be supported.
6.    I have a minor geometric error with the connector lines in some cases that I need to fix.
Comment 8 kurt.nordback@protonmail.com 2024-01-04 17:35:32 UTC
Created attachment 191765 [details]
Simple test case for bar-of-pie, also referenced below
Comment 9 Stéphane Guillou (stragu) 2024-01-28 05:27:36 UTC
Regina and Heiko, wondering if you'd like to review Kurt's work here?
Comment 10 Regina Henschel 2024-01-28 14:25:26 UTC
The patch mentioned in comment#7 has a merge conflict, so I cannot test it.

From what I read it seems, that the idea is, to implement it as different views of a pie chart. That would be not possible with ODF. The specification describes how the predefined chart types have to look.

But ODF allows to define own chart types. So my take is, that such a kind of chart should be implemented as new chart type and written to ODF with a non-ODF  name space, e.g as chart:class="loext:circleAndSubtype" or chart:class="chartooo:cirlePlus" instead of chart:class="chart:circle" of the predefined type.

Still the class for a new type can be derived from the class:PieChart internally.

Any solution needs to extend the API with a new service, so that the chart can be generated by macros. That is missing in the proposal.
Comment 11 kurt.nordback@protonmail.com 2024-01-28 15:20:43 UTC
Thanks for the input. I've rebased my code and fixed a compile error so I think it should be able to be tested now.

My planned next step is to implement ODF input/output using an extension namespace, as you say.

Can you point me towards where to look at the API?
Comment 12 Regina Henschel 2024-01-28 20:08:19 UTC
(In reply to kurt.nordback@protonmail.com from comment #11)
> Thanks for the input. I've rebased my code and fixed a compile error so I
> think it should be able to be tested now.

The patch has still merge conflicts.
Comment 13 Eyal Rozenberg 2024-01-28 20:32:12 UTC
Can we get a screenshot of this rendered in Excel please?
Comment 14 Eyal Rozenberg 2024-01-28 20:34:51 UTC
I would say that bar + pie is a different type than pie-with-remainder-as-another-pie.
Comment 15 kurt.nordback@protonmail.com 2024-01-28 23:08:05 UTC
Created attachment 192215 [details]
Simple pie-of-pie test
Comment 16 kurt.nordback@protonmail.com 2024-01-28 23:08:41 UTC
Created attachment 192216 [details]
pie-of-pie.xlsx as rendered on Excel 2010
Comment 17 kurt.nordback@protonmail.com 2024-01-28 23:09:10 UTC
Created attachment 192217 [details]
Simple bar-of-pie test
Comment 18 kurt.nordback@protonmail.com 2024-01-28 23:10:07 UTC
Created attachment 192218 [details]
bar-of-pie.xlsx as rendered on Excel 2010
Comment 19 kurt.nordback@protonmail.com 2024-01-28 23:12:57 UTC
Created attachment 192219 [details]
pie-of-pie.xlsx as rendered by this patch
Comment 20 kurt.nordback@protonmail.com 2024-01-28 23:13:18 UTC
Created attachment 192220 [details]
bar-of-pie.xlsx as rendered by this patch
Comment 21 kurt.nordback@protonmail.com 2024-01-28 23:35:24 UTC
Note in the screenshots that my code allots the last three values to the right (sub-) chart, whereas Excel by default allots the last two. I just thought three looked better but it's easy to change. In the long term this should be a selectable parameter.
Comment 22 kurt.nordback@protonmail.com 2024-01-30 15:45:37 UTC
I rebased my code and there's a new patchset available, but it appears to me that gerrit considers there still to be a merge conflict because it's only applying the last patchset. However, this seems to work to see the full set of code:

git fetch https://git.libreoffice.org/core refs/changes/42/160742/6 && git checkout FETCH_HEAD
Comment 23 Commit Notification 2024-02-02 05:04:09 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6c45285e860a6b2dd7dd1aa6c8b7b9bb02134dd0

tdf#50934: Initial plumbing and infrastructure

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 24 Commit Notification 2024-02-06 14:17:26 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/15633d637e6296df218d56130d041660bf0e8317

tdf#50934: Add a version comment, and more structure for of-pie

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 25 Commit Notification 2024-02-09 10:03:30 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/800b767f13d4fe9c7e7fc3271427a7193e17dbb6

tdf#50934: Ensure BarOfPie has ScaleData::ShiftedCategoryPosition == false

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 26 Commit Notification 2024-02-14 06:58:57 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

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

tdf#50934: Restructuring for of-pie charts

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 27 Commit Notification 2024-02-15 19:27:14 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8da681e5ef48606716219b2a4919ee90bf7a0d6b

tdf#50934: Some rejiggering of of-pie code, plus implementing subpie chart

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 28 Commit Notification 2024-02-16 07:07:47 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/63562694beb42b86d0f00dd3c18ac47bb094c9fe

tdf#50934: Implement PieDataSrc and related structure

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 29 Commit Notification 2024-02-16 08:19:05 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

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

tdf#50934: Implementation of bar-of-pie, plus minor of-pie fixes

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 30 Commit Notification 2024-02-17 06:07:34 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/853736f0d523c4f5459e15e7e109e81340f8c25e

tdf#50934: Fix of-pie subchart colors

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 31 Commit Notification 2024-02-17 06:08:36 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/756f8c850a38679e5b1b8c68c4c2ea5fe4883fbd

tdf#50934: Initial implementation of connector lines for bar-of-pie

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 32 Commit Notification 2024-02-17 06:08:39 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4df39957bd985af591f452439c8aa5fc5c7a0d62

tdf#50934: Ensure of-pie connector lines are black

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 33 Commit Notification 2024-02-17 17:01:45 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5d0093e8c3a862172ca96081d68e7757dfdf6067

tdf#50934: Improvements to fill color for of-pie composite wedge

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 34 Commit Notification 2024-02-18 06:33:59 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

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

tdf#50934: Implement connector lines for pie-of-pie

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 35 Commit Notification 2024-02-18 09:11:14 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1036994301de43f5a41134084ca866ed9ec7bf35

tdf#50934: Add a comment

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 36 Commit Notification 2024-02-19 00:29:46 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1cda27cf69054b006aa1b16cab8f56339274588b

tdf#50934: OfPie inport from OOXML, plus initial work for export

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 37 Commit Notification 2024-02-19 06:58:19 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

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

tdf#50934: Try to fix wedge ordering for imported of-pie charts

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 38 Commit Notification 2024-02-19 08:19:32 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/67e58d16f25332d2c96e2c9702bd78e9d76501c0

tdf#50934: Fix left of-pie ordering for imported charts

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 39 Commit Notification 2024-02-19 11:19:52 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

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

tdf#50934: Fix color of composite wedge for imported of-pie charts

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 40 Commit Notification 2024-02-19 11:31:56 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2b4e95b8f0e04a3c60df1887276068a9674d3d16

tdf#50934: Rudimentary UI images for pie-of-pie and bar-of-pie

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 41 Commit Notification 2024-02-19 13:59:28 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/72808cb6383b266e3e3e7844305216b9d6c0a058

tdf#50934: Add one of-pie test

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 42 Commit Notification 2024-02-19 19:35:03 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/96e9c3a7fd2ce877d6d4d87c5333334790f7d85a

tdf#50934: Fix compiler complaints and activate OOXML I/O tests

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 43 Commit Notification 2024-03-18 06:08:23 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9ae8e74fb32254c81d36b1c95411605459e06372

tdf#50934: Add a pie-with-remainder-as-another-pie chart type

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 44 Stéphane Guillou (stragu) 2024-05-16 00:57:41 UTC
(In reply to kurt.nordback@protonmail.com from comment #21)
> Note in the screenshots that my code allots the last three values to the
> right (sub-) chart, whereas Excel by default allots the last two. I just
> thought three looked better but it's easy to change. In the long term this
> should be a selectable parameter.
I've report bug 161090 for that issue.

Other follow-up reports:
- bug 161091 for documentation gap
- bug 161092 for missing graphics
- bug 161093 for being unable to reach all Pie chart types in the Chart Properties sidebar deck

Kurt, do you feel like this report can be closed as "fixed", and further refinements can be tracked in separate reports?
Comment 45 kurt.nordback@protonmail.com 2024-05-16 02:14:47 UTC
Sounds good, I will close this as fixed.
Comment 46 Stéphane Guillou (stragu) 2024-05-16 06:31:17 UTC
Thanks for all your work on this, Kurt!

Verified in:

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 658a212585c56540a17c41111e6829716d4ef4e3
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Added to the release notes: https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F24.8&type=revision&diff=751011&oldid=750726