[Solved] Add new data to chart

Discuss the spreadsheet application
Locked
Meadowlark
Posts: 4
Joined: Thu Nov 07, 2024 9:51 am

[Solved] Add new data to chart

Post by Meadowlark »

 Edit:  
My spreadsheet has data in many non adjacent columns that is added to daily. From this data I produce a selection of line charts that track the daily changes. So along the bottom (X-axis) is date, and the Y-axis is the data value. Is there an "easy" way to add this new daily data to my ongoing charts? In Excel it was simple to click on the chart line which highlighted the relevant colums in the spreadsheet including the data already applied to the chart. By extending this box to the new data values, the chart was updated.
I cannot see any similar facility in Libre?
Using Windows 11, LibreOffice Calc
Last edited by Meadowlark on Fri Nov 08, 2024 11:30 am, edited 3 times in total.
LibreOffice 24.8 on Windows11
Suffolk, UK
User avatar
robleyd
Moderator
Posts: 5265
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Add new data to chart

Post by robleyd »

See if double clicking on the chart, right click and select Data Ranges gives what you want.

Please consider updating your signature to reflect your Office suite and version and operating system.
Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.8.3.2; SlackBuild for 24.8.3 by Eric Hameleers
---------------------
Roses are Red, Violets are Blue
Unexpected '{' on line 32
.
Meadowlark
Posts: 4
Joined: Thu Nov 07, 2024 9:51 am

Re: Add new data to chart

Post by Meadowlark »

It is possible to update the charts this way, but you have to know and type the exact location of the new data cells "by hand." This is not so difficult I guess, but it is cumbersome when compared to Excel. I suppose the answer is to not update the graphs so often....
LibreOffice 24.8 on Windows11
Suffolk, UK
User avatar
Lupp
Volunteer
Posts: 3620
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Add new data to chart

Post by Lupp »

BTW: Calc Charts accept named ranges in "Data Ranges" and in the "Series" fields..
Unfortunately they do not accept array formulas.
And unfortunately again they replace the range names by range addresses when saving.
(You may post an enhancement request. If you do so, please link it into this thread.)
See example:
aoo112069_ChartsBasedOnNamedRanges.ods
(70.18 KiB) Downloaded 11 times
On Windows 10: LibreOffice 24.8.3 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
MrProgrammer
Moderator
Posts: 5099
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Add new data to chart

Post by MrProgrammer »

Meadowlark wrote: Thu Nov 07, 2024 10:10 am My spreadsheet has data in many non adjacent columns that is added to daily.
If the new daily data will be in additional cells at the bottom of existing columns, just define the Data Ranges to include large ranges of cells. For example if the Y-value for the first series is currently A2:A9, change that to A2:A999. The chart will ignore cells of the column which are empty. As you enter values there, the chart will be updated.

If you need any additional assistance attach a spreadsheet demonstrating the situation (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the spreadsheet itself). I will not help further unless you attach a spreadsheet document. Explain which data in your attachment is the latest daily addition.

Meadowlark wrote: Thu Nov 07, 2024 10:10 am In Excel it was simple to …
If Excel better meets your needs then you should use it, of course.

If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.

[Tutorial] Ten concepts that every Calc user should know
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Meadowlark
Posts: 4
Joined: Thu Nov 07, 2024 9:51 am

Re: Add new data to chart

Post by Meadowlark »

Oh! That's interesting. I could try that. Many of the cells are indeed empty but others have formulas associated with them so do contain spurious values. Perahps I could fix that though? I'll give it a try. Thanks for your help.

I have "lost" my old Excel device and I am reluctant to spend so much money on an annual renewal, so I'm trying to get going with Libre.
LibreOffice 24.8 on Windows11
Suffolk, UK
User avatar
Villeroy
Volunteer
Posts: 31324
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Add new data to chart

Post by Villeroy »

If your current chart area is A1:F99, insert a new row of cells in order to expand to A1:F100. Insertion of a new column expands to A1:G99.
The exact same applies to references in formulas, references in names, conditional formats, validation, form controls, ... where the count of rows/columns is more than 1. Any reference to A1:A99 will not expand by insertion of a new column, nor will any reference to a single row like A1:X1.

There is a Calc option "Expand references when new rows/columns are inserted". In most cases you want this options turned on because it will always insert new rows/columns, even when you insert rows/cols below/behind the current references.
If this option is off:
- New rows/cols on top/leftmost will shift the references down/right.
- New rows/cols directly below/behind will not expand references.
- Only rows/cols between #2 and the last one will expand references.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Meadowlark
Posts: 4
Joined: Thu Nov 07, 2024 9:51 am

Re: Add new data to chart

Post by Meadowlark »

I have extended the range of cells as advised by Mr Programmer and adjusted the cell values so they read zero if there is no relevant data. Seems like this works Thanks for all your help!
LibreOffice 24.8 on Windows11
Suffolk, UK
Locked