Bug 72514 - VaryColorsbyPoint changes legend colors, not point colors
Summary: VaryColorsbyPoint changes legend colors, not point colors
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
3.5.7.2 release
Hardware: Other All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2013-12-09 11:18 UTC by Dorien James
Modified: 2019-03-18 21:58 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Simple scatter chart and macro to change value of VaryColorsbyPoint (20.25 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-12-09 11:18 UTC, Dorien James
Details
Screenshot of the Basic macros dialog: only AttachLabelsToPoints and CreateChart. (57.30 KB, image/png)
2013-12-10 00:21 UTC, Owen Genat (retired)
Details
VaryColors macro (733 bytes, text/plain)
2013-12-10 13:48 UTC, Dorien James
Details
Chart appearance before macro: VaryColorsbyPoint = FALSE (26.90 KB, image/png)
2013-12-10 13:53 UTC, Dorien James
Details
Chart appearance after macro: VaryColorsbyPoint = TRUE (33.58 KB, image/png)
2013-12-10 13:53 UTC, Dorien James
Details
Chart appearance after save, reopen and rerun (36.48 KB, image/png)
2013-12-10 14:24 UTC, Dorien James
Details
Finally: Chart appearance after reswitching VaryColorsbyPoint = FALSE (30.16 KB, image/png)
2013-12-10 14:38 UTC, Dorien James
Details
Updated version of VaryColorsbyPoint (includes VaryColors macro). (31.32 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-07-28 14:34 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dorien James 2013-12-09 11:18:37 UTC
Created attachment 90504 [details]
Simple scatter chart and macro to change value of VaryColorsbyPoint

The LibreOffice Calc spreadsheet contains a Scatter chart.  The BASIC macro VaryColors is used to turn the attribute DataSeries.VaryColorsbyPoint to TRUE.  This creates a legend where each point has a different color.  However, the points in the scatterchart are not recolored:  each retains the default color.

The expected behavior would be vary point colors so as to match the data points to the colors given in the legend.

UPDATE while recreating:  behavior is inconsistent.  Sometimes, cycling the VaryColorsbyPoints flag (edit VaryColors macro and rerun) will set the legend to a single color and the points to multiple colors; sometimes it will create the "correct" behavior of multiple matching colors for both legend and points.  I cannot isolate anything different between the different attempts.
Comment 1 Owen Genat (retired) 2013-12-10 00:21:27 UTC
Created attachment 90544 [details]
Screenshot of the Basic macros dialog: only AttachLabelsToPoints and CreateChart.

(In reply to comment #0)
> The BASIC macro VaryColors is used to turn the attribute 
> DataSeries.VaryColorsbyPoint to TRUE.

There does not appear to be a macro with this name or containing this string in the original attachment (refer screenshot). Can this please be confirmed? Was the correct example attached? 

Related information from ODF v1.2, Part 1, 11.13:

> The <chart:data-point> element specifies a style for a single data point in a data series. Note: This element can be used if a single data point has a special or distinct appearance.

To me, that implies the ability to edit data points individually. Currently the GUI facility only supports editing characteristics that apply to all data points. This may be a restriction based on the UNO API implementation, although this comment in:

http://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/chart2/DataSeries.idl#159

> /** If `TRUE`, the data points of this series get different
>     colors by default, like in a pie chart.
>     */
> [optional, property] boolean                    VaryColorsByPoint;

... would seem to imply that each point in a series should receive a different colour.
Comment 2 Dorien James 2013-12-10 13:48:27 UTC
Created attachment 90578 [details]
VaryColors macro

Apologies, poor understanding/discipline on where to store macros.  I have (I hope) moved the macro from my Standard template into the .ods where it can be found in Standard\Modules\DorienCode.  I have also pasted separately pasted the code as a text attachment.
Comment 3 Dorien James 2013-12-10 13:53:17 UTC
Created attachment 90579 [details]
Chart appearance before macro: VaryColorsbyPoint = FALSE
Comment 4 Dorien James 2013-12-10 13:53:55 UTC
Created attachment 90580 [details]
Chart appearance after macro: VaryColorsbyPoint = TRUE
Comment 5 Dorien James 2013-12-10 14:03:05 UTC
Comment on attachment 90580 [details]
Chart appearance after macro: VaryColorsbyPoint = TRUE

Legend points show correct behaviour:  "different colors by default, like in a pie chart."
Chart points do not.
Comment 6 Dorien James 2013-12-10 14:24:51 UTC
Created attachment 90581 [details]
Chart appearance after save, reopen and rerun

I've now been able to reproduce further behaviour as follows:
1.  Open VaryPointsbyColor.ods
2.  Run VaryColors macro: chart appearance changes as shown in 90580
3.  Save and close the VaryPointsbyColor.ods
4.  Reopen VaryPointsbyColor.ods
5.  Run VaryColors macro:  chart displays correct appearance as shown here, with both legend and points showing various colors
Comment 7 Dorien James 2013-12-10 14:38:43 UTC
Created attachment 90584 [details]
Finally: Chart appearance after reswitching VaryColorsbyPoint = FALSE

Finally, edit the macro so that the final line reads:
'	Switch VaryColorsbyPoint flag
      oObj_5.VaryColorsbyPoint = False
and rerun.  Changes the chart appearance so that points are varied but legend is single-colour!

So in summary:
Action                Flag value       Point colours    Legend colours
------                ----------       -------------    --------------
Create chart          Presume false    Single           Single
Switch flag to True   True             Single           Multiple
Save doc and reload   Presume true     Single           Multiple
Rerun macro           True             Multiple         Multiple
Switch flag to False  False            Multiple         Single

Once the point colours have gone to "multiple", I cannot find any combination of saving, reopening and switching the flag which will revert them to single.  On the other hand, the legend colours reliably behave as expected.
Comment 8 Owen Genat (retired) 2014-07-28 14:34:18 UTC
Created attachment 103594 [details]
Updated version of VaryColorsbyPoint (includes VaryColors macro).

(In reply to comment #2)
> Apologies, poor understanding/discipline on where to store macros.  I have
> (I hope) moved the macro from my Standard template into the .ods where it
> can be found in Standard\Modules\DorienCode.  I have also pasted separately
> pasted the code as a text attachment.

Dorian, sorry I have not looked at this before now. I have edited a couple of the attachments to this report as the text of the macro attached in comment 2 did not replace the original document. I am now attaching a version of the original ODS with the VaryColors macro saved under Standard > Modules > Module1.

(In reply to comment #6)
> 1.  Open VaryPointsbyColor.ods
> 2.  Run VaryColors macro: chart appearance changes as shown in 90580
> 3.  Save and close the VaryPointsbyColor.ods
> 4.  Reopen VaryPointsbyColor.ods
> 5.  Run VaryColors macro:  chart displays correct appearance as shown here,
> with both legend and points showing various colors

Thanks for these helpful instructions. I can now confirm this result with the attached version of the file.
Comment 9 Owen Genat (retired) 2014-07-28 14:38:01 UTC
As per comment 8 confirmed. Status set to NEW.

(In reply to comment #8)
> Dorian, 

"Dorien" (sorry).
Comment 10 QA Administrators 2015-09-04 02:47:42 UTC Comment hidden (obsolete)
Comment 11 Buovjaga 2015-11-18 10:34:35 UTC
Still repro.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: b216cc1b8096eb60c27f67e8c27b7cd756c75e38
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-11-12_00:06:20
Locale: fi-FI (fi_FI)
Comment 12 QA Administrators 2017-01-03 19:35:13 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present on a currently supported version of LibreOffice 
(5.1.6 or 5.2.3  https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the version of LibreOffice and 
your operating system, and any changes you see in the bug behavior
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave 
a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to "inherited from OOo";
4b. If the bug was not present in 3.3 - add "regression" to keyword


Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug-20170103