Description: For some cases of column labels (dates) the trend lines are displayed wrong, with a displacement in the X direction, equal to half of the X interval. Steps to Reproduce: 1. On a blank Calc sheet, create a first column (A1:A7) with dates (I've used 2021-05-15, 2021-06-15 ... ), format as MM-AA 2. Create a second column (B1:B7) with the numbers (20, 10, 20, 30, 20, 20, 40) 3. Select filled cells, insert graph: select line type 4. In the second step of the wizard, select defaults: "Data series in columns / First column as label" . Click Finish. 5. If the graph is cropped (bug 146066), you may fix the Y axis range to 0-45. 6. Right click over the data series, insert Trend line, select Moving average, Period=2, Type=Prior Actual Results: The trend line is wrong, it's displaced to the right by a distance equal to half-interval. That's especially noticiable on the rightmost point (its MA value should be 30, it's seen as 25), and also is noticiable in the inflection points not being aligned with the main graph. Expected Results: The trend line should be shifted to the left, with its inflection points aligned with the main graph. Reproducible: Always User Profile Reset: Yes Additional Info: The problem persists for the "Central" MA variant The problem disappears if the values of the label column are deleted, or set to numeric or string values. If the "Averaged abcisas" is selected, the offset is still inconsistent (dependent on the label column type), but I'm not sure which is the right one. (I'd say that here we'd indeed expect the inflection points to be located between the graph values - again, this assumption is violated when the label column contain dates).
Might have some relation with https://bugs.documentfoundation.org/show_bug.cgi?id=146066
Created attachment 176716 [details] Capture with different label types
Additional Info: Version: 7.2.2.2 (x64) / LibreOffice Community Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56 CPU threads: 6; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: es-AR (es_AR); UI: en-US Calc: CL
Created attachment 176723 [details] My own sample document with screenshot NOT reproducible with own test and Installation of Version 7.2.3.2 (x64) / LibreOffice Build d166454616c1632304285822f9c83ce2e660fd92; CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win; Locale: de-DE (de_DE); UI: de-DE; Calc: threaded; My normal User Profile @Reporter: Please tell a) did I make a mistake when I tried to reproduce? b) details concerning your OS ... c) what do you see opening my sample document? d) please open your sample document!
@Reporter d) please ATTACH your sample document! e)may be your dates are 15.05., 15.06 ... instead of 01.05, 01.06. ...?
Created attachment 176727 [details] my sample file
@Rainer I've added my sample file You're right, the bug does not manifest when dates are 2021-05-01, 2021-06-01... but when they are 2021-05-15, 2021-06-15...
The issue seems to be related with the calculation of the X-axis automatic range, see also bug 146066
Created attachment 176730 [details] New sample document with modified Numbers So there might be no bug. But: In my new sample I compare diagram for x axis numbers 5 ... 11 with diagram for x axis numbers 5,49 ... 11,49 I expected that in 5,49 ... trend line would look like dates 2021-05-15 ..., but it does not. I am not familiar with those trend lines. @Hernan What is your comment for this?
Your examples with numeric X-values work fine. To clarify, the expected behaviour for a Moving Average trend line for MA=2, variant Prior is (I'm assumming) : - For each point in the original series a new point is generated with the same same abcissa, and with a Y-value given by the average of the original point and the previous one. Then the points are joined by straight lines.
Created attachment 183950 [details] 20221202_146067_repro_attempt 20221202_146067_reproduce_attempt
Following are the steps performed recently, Steps: 1) select cells A1:A10, then right-click "Format cells" 2) select "Category: Date", "Format: 1999-12-31", "Format Code: YYYY-MM-DD" 3) fill in cells from A1 to A7 with date range 05-2022 to 11-2022 4) fill in cells from B1 to B7 with numeric values as follows 20, 10, 20, 30, 20, 20, 40 5) select cells A1:B7, then from the menu "Insert" -> "Chart" 6) select "Choose a Chart Type: Line" and select "Points and Lines", click "Next" 7) ensure default values are selected / enabled like "Data series in columns" and "First column as label", click "Finish" 8) right click on Line graph that is generated. select "Insert Trend Line..." 9) select "Moving Average", with the default values "Period: 2", "Type: Prior", click "OK" Actual Result: The Moving Average[MA] is set to 30. A sample file used for the outcome is attached. tested in version: Version: 7.4.3.2 (x64) / LibreOffice Community Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890 CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: en-IN (en_IN); UI: en-US Calc: threaded Version: 7.5.0.0.alpha1+ (x64_64) / LibreOffice Community Build ID: 982f9ec1e07364e317fbcd25f1ef06f984cc0ce8 CPU threads: 3; OS: Linux 5.10; UI render: default; VCL: gtk3 Locale: en-IN (en_IN); UI: en-US Calc: threaded Hello, Thank you for reporting the bug. Can you please confirm if the issue still exists in the latest build? Could you please try to reproduce it with a master build from https://dev-builds.libreoffice.org/daily/master/ ? You can install it alongside the standard version. I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the master build.
Dear Hernan, This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INSUFFICIENTDATA due to lack of needed information. For more information about our NEEDINFO policy please read the wiki located here: https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed. Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-NeedInfo-Ping
Dear Hernan, Please read this message in its entirety before proceeding. Your bug report is being closed as INSUFFICIENTDATA due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided): a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present b) Provide easy to reproduce steps – the simpler the better c) Provide any test case(s) which will help us confirm the problem d) Provide screenshots of the problem if you think it might help e) Read all comments and provide any requested information Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. Please do not: a) respond via email b) update the version field in the bug or any of the other details on the top section of our bug tracker Warm Regards, QA Team MassPing-NeedInfo-FollowUp
Created attachment 188156 [details] Diagrams created and saved in various LibO Versions Well, there IS a problem, but I can't find out which one. I edited reporter's sample document with LibO 7.6, then with 4.0, and again with 7.6 and saw various strange effects with Trend Lines and Mean Value Lines. But But an expert will have to find out which effects are intended and which ones are bugs.