Bug 117661 - Allow anchoring of any object to chart axis date values
Summary: Allow anchoring of any object to chart axis date values
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart-Enhancements
  Show dependency treegraph
 
Reported: 2018-05-17 09:19 UTC by marcin_mail2005
Modified: 2019-03-20 10:12 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Chart before data add & X-axis range expand (193.88 KB, image/png)
2018-06-20 23:40 UTC, marcin_mail2005
Details
Chart after data add & X-axis range expand (200.85 KB, image/png)
2018-06-20 23:45 UTC, marcin_mail2005
Details
Chart manually ammended after data expand (199.08 KB, image/png)
2018-06-20 23:49 UTC, marcin_mail2005
Details
Spreadsheet (15.35 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-06-21 12:09 UTC, marcin_mail2005
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marcin_mail2005 2018-05-17 09:19:37 UTC
Description:
When you create a chart in Calc, and X-axis is a time, so all manually added objects are not bounded to X-axis - which results that objects do not move when you add new data.
I propose to add a property for object, which if checked (name of that option = "Bound to X-axis", for example) would cause "sticking" object to X-axis, so if new data are added (when X-axis labels is time & data), object would move appropriately to time/date label, when it was created.
It is helpful with timeline charts, when you mark some events, for example mark your birthday. When you add new data, because you update chart frequently, all data shrink and objects normally stay in the same place, which is bad - object should move a bit left to match data label, when it was created.
Capisci ? ;-)

Steps to Reproduce:
1.Create chart in calc, use time&data as X-axis
2.Add some object, like line, and add some text to it - to have a look like flag that points to that specific date. For example write "this is my birthday" and place vertical line to some date on X-axis
3.Add additional data to your chart (expand source data).
4.Look how your birthday changes (ERROR !)

Actual Results:  
You can observe data shrink when you add new data to your chart, whether object stay in the same place.

Expected Results:
Object should move with shrinked data, to point the same date @ X-axis.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Comment 1 Buovjaga 2018-06-15 13:10:15 UTC
(In reply to marcin_mail2005 from comment #0)
> 2.Add some object, like line, and add some text to it - to have a look like flag that points to that specific date. For example write "this is my birthday" and place vertical line to some date on X-axis

Please attach an example document at this step.
Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 2 marcin_mail2005 2018-06-20 23:40:40 UTC
Created attachment 142985 [details]
Chart before data add & X-axis range expand
Comment 3 marcin_mail2005 2018-06-20 23:45:14 UTC
Created attachment 142986 [details]
Chart after data add & X-axis range expand

I have added more data (so data range has been expanded). See "PSR S970 release" flag - it points to some specific data, which now is bad - compare to previous (Before.png) chart and see positioning of this flag to PSR S950 first data point.
Comment 4 marcin_mail2005 2018-06-20 23:49:14 UTC
Created attachment 142987 [details]
Chart manually ammended after data expand

This is how chart should look like. All I've done was manual movement of "PSR S970 release" flag to correct data (which shrinked on X-axis scale as soon as range has been expanded).
Clue is to "anchor" such object (by context menu -> stick object to X-axis, for example), so each data manipulation should recalculate positioning of that object to according X-axis data.
Comment 5 Buovjaga 2018-06-21 10:46:18 UTC
I asked for a document, not screenshots. Please attach the document.
Comment 6 marcin_mail2005 2018-06-21 12:09:01 UTC
Created attachment 142996 [details]
Spreadsheet

I can't give my 3 years source data, but this bug works with any newly created spreadsheet, like with attached one.

Try to add more data  and display them at the chart (expand display data range). All existing data will be "squeezed", whether vertical line stays at the same place.
Comment 7 Buovjaga 2018-06-22 12:55:55 UTC
Ok, as even our line chart seems to work interpolated (if you have gaps in dates, it shows the missing dates), this should be doable. No idea how difficult on the level of code, though.

Accepting as enhancement, because I know this is quite a standard thing in charting solutions.