Bug 155526 - Moving average trend line equation on chart does not show period and R^2
Summary: Moving average trend line equation on chart does not show period and R^2
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium trivial
Assignee: Laurent Balland
URL:
Whiteboard: target:24.2.0 target:7.6.0.0.beta2 ta...
Keywords: implementationError
Depends on:
Blocks: Chart-Trendlines
  Show dependency treegraph
 
Reported: 2023-05-27 17:56 UTC by Vladislav Tarakanov
Modified: 2023-08-07 08:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladislav Tarakanov 2023-05-27 17:56:29 UTC
Description:
If click "Insert R^2 and Trend Line Equation" after plotting the moving average for the chart, then the lines "Moving Average trend line with period = %PERIOD" and "R^2 = NaN" will be obtained, which does not look like the expected behavior

Steps to Reproduce:
1. Write arbitrary numbers in any column
2. Select the numbers written and click "Insert Chart" on the toolbar
3. Choose any type of chart and build a chart
4. Select data series and in the context menu click "Insert Trend Line..."
5. Select "Moving Average" type and click "ok"
6. Select trend line and in the context menu click "Insert R^2 and Trend Line Equation"

Actual Results:
The strings "Moving Average trend line with period = %PERIOD" and "R^2 = NaN" are displayed

Expected Results:
Display strings like "Moving Average trend line with period = 2"


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: efcbd2306f0310809f2d6f1db086b839055c77f6
CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
Calc: CL threaded
Comment 1 raal 2023-05-28 19:20:37 UTC
Confirm with Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 578758835e700b38b167753ccda9527f3a8cc43b
CPU threads: 4; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Version: 4.5.0.0.alpha0+
Build ID: 2851ce5afd0f37764cbbc2c2a9a63c7adc844311

It was introduced in this bug https://bugs.documentfoundation.org/show_bug.cgi?id=40315
@Laurent, please can you take a look?
Comment 2 Laurent Balland 2023-05-29 17:17:37 UTC
Actually, moving average trend line do not have R² nor equation. It is why these options are disabled in dialog. It should also be disabled context menu.
I will have a look ASAP.
Comment 3 Commit Notification 2023-06-18 11:31:52 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "master":

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

tdf#155526 Add Period to trend line equation

It will be available in 24.2.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 4 Vladislav Tarakanov 2023-06-21 21:55:29 UTC
Checked in
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f3db857905437d4ce3b41fd75bd591e2f7801c5f
CPU threads: 12; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
Calc: CL threaded

The equation looks nice, but for R² it still prints "R² = NaN". Is there a way to display this as something like "R² does not exist for this trend line" or remove the option that display R² from the context menu?
Comment 5 Laurent Balland 2023-06-22 07:54:14 UTC
(In reply to Vladislav Tarakanov from comment #4)
> The equation looks nice, but for R² it still prints "R² = NaN". Is there a
> way to display this as something like "R² does not exist for this trend
> line" or remove the option that display R² from the context menu?

I'm trying to remove "Insert R²" from context menus, but my change still needs some polish:
https://gerrit.libreoffice.org/c/core/+/153294
After this change, it should be impossible to display R² value on chart for moving average trend line. It would need some QA test.
Comment 6 Commit Notification 2023-06-27 05:49:05 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "master":

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

tdf#155526 Moving average: remove Insert R2

It will be available in 24.2.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 7 Commit Notification 2023-06-29 06:02:45 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/125b0f6609332523d30bef600979b698c2d216f8

tdf#155526 Restore status bar for moving average

It will be available in 24.2.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 8 Commit Notification 2023-06-29 07:42:08 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/439e2fb0ccc8fc75fb9239a7370db9dd56ee9c55

tdf#155526 Moving average: remove Insert R2

It will be available in 7.6.0.0.beta2.

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 9 Commit Notification 2023-06-29 10:35:46 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/917aff51c9f119105eacb527b7829c67ffe044bb

tdf#155526 Add Period to trend line equation

It will be available in 7.6.0.0.beta2.

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 10 Commit Notification 2023-06-29 13:20:18 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

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

tdf#155526 Restore status bar for moving average

It will be available in 7.6.0.0.beta2.

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 11 Commit Notification 2023-07-01 13:26:12 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/6916aef75602b598c096fba00567e884dd010a7b

tdf#155526 Add Period to trend line equation

It will be available in 7.5.6.

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 12 Commit Notification 2023-07-03 13:35:31 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/37d8a0f0a4814891b563eac789379787d9179cf5

tdf#155526 Restore status bar for moving average

It will be available in 7.5.6.

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 2023-07-05 01:19:58 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/47d3f102add9a46216e9082efdff362eb8555ad3

tdf#155526 Moving average: remove Insert R2

It will be available in 7.5.6.

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 Commit Notification 2023-07-16 12:32:13 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "master":

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

tdf#155526 Remove Insert R2 in all cases

It will be available in 24.2.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 15 Commit Notification 2023-08-03 08:30:40 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

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

tdf#155526 Remove Insert R2 in all cases

It will be available in 7.6.1.

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 2023-08-07 08:47:00 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#155526 Remove Insert R2 in all cases

It will be available in 7.5.6.

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.