Bug 139856 - CALC CHART Trend Lines for moving average not being "smoothed" similarly to Polynomial Trend Lines
Summary: CALC CHART Trend Lines for moving average not being "smoothed" similarly to P...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All Windows (All)
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart-Trendlines
  Show dependency treegraph
 
Reported: 2021-01-23 08:46 UTC by Colin
Modified: 2022-06-13 11:56 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
simple ,ods with chart & trend line function (32.57 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-01-23 08:47 UTC, Colin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Colin 2021-01-23 08:46:42 UTC
Description:
Moving Average Trend Line doesn't conform to any "smoothing" criteria imposed on the underlying "smoothed" line chart.
As a comparison, the Polynomial line is "smoothed"
See attached .ods with the resulting chart line and two trend lines.

As a side line, is there a rationale for having version history extending all the way back to 3.3.0 release?

Steps to Reproduce:
See attached sheet SmoothLine.ods
If desired, clear and recreate the green & red trend lines
Green is a 3 event moving average & red is a 6 Deg Polynomial
or simply right click and edit the parameters
There only exists a setting to "smooth" the base chart line
One might infer from the lack of setting for the trend lines that the waveform for all the trend lines would correspond to the baseline. It appears that the more complex formulaic trend lines follow the defined smoothness of the baseline whereas that for the 3 event moving average trend line does not.

Actual Results:
3 event moving average trend line is not "smoothed"

Expected Results:
I would have assumed a smooth line


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 7.0.4.2 (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: sv-SE (en_GB); UI: en-GB
Calc: threaded
Comment 1 Colin 2021-01-23 08:47:35 UTC
Created attachment 169105 [details]
simple ,ods with chart & trend line function
Comment 2 Tomaz Vajngerl 2021-01-23 11:55:12 UTC
Actually none of the trend lines are smoothed but they look smooth because they are transformed into an approximated function, which is then sampled for drawing. 

That's not the case for moving average, which is different kind of transform, which results in averages of input values, not a function.

So the question is if we should allow to also "smooth" that line or not. For example Excel doesn't - you can smooth a data line, but not a trend line.
Comment 3 Colin 2021-01-23 12:04:42 UTC
> 
> So the question is if we should allow to also "smooth" that line or not. For
> example Excel doesn't - you can smooth a data line, but not a trend line.

If asked, I would observe that not smoothing the line gives a slightly less professional look.

No, I don't line all my fish sticks up on the plate 😉
Comment 4 Colin 2021-01-23 12:13:38 UTC
(In reply to Colin from comment #3)
> > 
> > So the question is if we should allow to also "smooth" that line or not. For
> > example Excel doesn't - you can smooth a data line, but not a trend line.
> 
> If asked, I would observe that not smoothing the line gives a slightly less
> professional look.
> 
> No, I don't line all my fish sticks up on the plate 😉

I would also observe that we do lots of things better than Excel - try sorting an auto filtered array with non-array cells referencing that array. Sometimes you're lucky.
If we can be better and still not shoot ourselves in the foot when it comes to exporting to xlsx I would argue that it's worth the effort if it's not too onerous a task and we have the resources.
Comment 5 Louis Steinberg 2021-02-21 21:46:53 UTC
Here is a workaround:  Add a column D to your spreadsheet which calculates a running average of column C and add it as to the plot separately as a smoothed line.
Comment 6 Colin 2021-02-22 06:44:37 UTC
(In reply to Louis Steinberg from comment #5)
> Here is a workaround:  Add a column D to your spreadsheet which calculates a
> running average of column C and add it as to the plot separately as a
> smoothed line.

Hi Louis and thanks for your endeavours: I have already added columns for 3,7,10&14 event moving averages - 5664 "surplus" cells with a daily "growth" rate of +20 for the four new data elements. 400% overhead for smooth lines :(.
As the columns are autofiltered and the charts can react to any filtering or sorting, that predicates quite an overhead when each new data element is appended and a new "snapshot" taken. It's almost as if one can see the cogs turning ;).
Thanks again.