[Solved] Dynamic chart - how to do it ?

Discuss the spreadsheet application
Post Reply
marklb
Posts: 12
Joined: Mon Nov 11, 2013 11:08 pm
Location: Poland

[Solved] Dynamic chart - how to do it ?

Post by marklb »

Hi,

I am looking for help with dynamic chart in CALC,
I use data form BASE in chart, but when there is some new data chart is not showing this , as chart data range is not chnaged,

I read that named data range is not working in OO for charts,

Do anybody have workaround for this , nay makro ?

Thanks in advance
Last edited by marklb on Wed Nov 20, 2013 7:30 pm, edited 2 times in total.
oOO 4.0.1
Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Dynamic chart - how to do it ?

Post by Villeroy »

[Tutorial] Using registered datasources in Calc
I read that named data range is not working in OO for charts,
Where did you read that?
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
marklb
Posts: 12
Joined: Mon Nov 11, 2013 11:08 pm
Location: Poland

Re: Dynamic chart - how to do it ?

Post by marklb »

HI Villeroy,

I mean dynamic data range in chart,
when I refresh data sorce for BASE, chart is not changing, as chart data sorce is not changed,
do you mean same ?
oOO 4.0.1
Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Dynamic chart - how to do it ?

Post by Villeroy »

A simple menu:Data>Refresh updates the import range. It imports the data, adjusts the size of the import range and the chart, all formulas, names etc. will update to the new reference.
You can not run database queries all the time but you can set up the import range to update in reasonable intervals.
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
marklb
Posts: 12
Joined: Mon Nov 11, 2013 11:08 pm
Location: Poland

Re: Dynamic chart - how to do it ?

Post by marklb »

Hi,
Its not working for me , let me describe what iam doing, as maybe you find iam doing soemthing wrong,
1. I have table in BASE -> Table1
2. I import Table1 to CALC, -> F4 then I choose Table1 and drage and drop to calc, all data are visible, lest assuem I have 3 entry there in coulmn , name and age
3. Then I mark all date in table1 using mouse and click Chart icon
4. I have chart which show Name and Age for all entries corectly -> 3 entry in chart
5. I come back to BASE table1 and I add additional entry, so now we have 4 entries
6. I come back to CALC, mark by mouse imporeted table and I click -> DATA ->Refresh Range
7. I see that imported Table1 form base is refreshed correctly , additional row appear , so we have now 4 rows with data
8. CHart is not updated , still showing just 3 entry, now entry not appear

how now is clear what iam doing, I need that chart have to be alos updated,
DO you know what I can do with this ?
oOO 4.0.1
Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Dynamic chart - how to do it ?

Post by Villeroy »

We overlooked one thing. For all import ranges the following options should be set by default.
menu:Data>Define... [More Options]
1. Contains Header : database data always import with a header row
2. Insert and delete cells : this takes care that new records and fields insert new cells on import (or delete unused cells)
3. Keep formatting : which keeps the spreadsheet's formatting
In my honest opinion these options are obsolete. Unchecking these options makes no sense to me.
The last option may be useful sometimes:
4. Don't save imported data : makes the saved document smaller, enforces a refresh on document load

The attached file imports the Bibliography demo (dBase) we all have by default in our data source window.
The table is text only, so I added an arbitrary set of numbers in column AF, set the above options 2 and 3, added a chart and 2 records with identifier "Foo01" and "Foo02".
When you refresh the import, the import range, the adjacent formulas in column AF and the calculated average in row 63 will shift up or down, depending on the size of your biblio table. The chart will adjust to the new size.
biblio_import.ods
dynamic biblio import with calculated field, average formula and chart
(25.1 KiB) Downloaded 301 times
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
marklb
Posts: 12
Joined: Mon Nov 11, 2013 11:08 pm
Location: Poland

Re: Dynamic chart - how to do it ?

Post by marklb »

Hello,
I have changed "Data Definition" as you described to me,
now chart is working fine and iam very happy, can continue my project

Danke Schone :)
oOO 4.0.1
Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved]Dynamic chart - how to do it ?

Post by Villeroy »

I filed an enhancement request for the data range dialog: https://issues.apache.org/ooo/show_bug.cgi?id=123725
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
Post Reply