[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

Author Message
mlerutte
General User

Joined: 23 Jan 2006
Posts: 6
Location: Swalmen, The Netherlands

Posted: Mon Jan 30, 2006 12:24 pm    Post subject: Distributing a graph by time

I have a matrix of numbers assigned to an irregular list of dates:
 Code: D1 N11 N12 N13 N14 D2 N21 N22 N23 N24 ... Dn Nn1 Nn2 Nn3 Nn4

The distance between the days is not equal, it may be one day or even a couple of weeks.

If I create a graph in Calc it uses the literal date values. One does not see what happens over time but what happens on each recorded date.

The same calc sheet exported to XLS and then opened in Excel shows what I want: the dates in the graph are nicely distributed and the user sees perfectly the trend over time.

How do I realize this in Calc?
jrkrideau
Super User

Joined: 08 Aug 2005
Posts: 6733

Posted: Tue Jan 31, 2006 6:53 am    Post subject: Re: Distributing a graph by time

mlerutte wrote:
I have a matrix of numbers assigned to an irregular list of dates:
 Code: D1 N11 N12 N13 N14 D2 N21 N22 N23 N24 ... Dn Nn1 Nn2 Nn3 Nn4

The distance between the days is not equal, it may be one day or even a couple of weeks.

If I create a graph in Calc it uses the literal date values. One does not see what happens over time but what happens on each recorded date.

The same calc sheet exported to XLS and then opened in Excel shows what I want: the dates in the graph are nicely distributed and the user sees perfectly the trend over time.

How do I realize this in Calc?

What chart form are you using? It sounds to me as if you are using a line chart when you may need to be using an XY graph.

A line chart treats the values on the x-axis as seperate categories so that NOV 1, DEC 1 is no different from Potato, Wheat. An XY graph treats the x -axix as a continous variable and will space the x-axis labels evenly. You can also edit the scale if you need to.
_________________
jrkrideau
Currently using Windows 7 & OOo 3.4.0 and Ubuntu 12.04 & LibreOffice 3.5.2.2
mlerutte
General User

Joined: 23 Jan 2006
Posts: 6
Location: Swalmen, The Netherlands

Posted: Tue Jan 31, 2006 12:05 pm    Post subject:

No I did not use an XY chart. Using an XY chart indeed distributes the day correctly but it does not stack the values. Each value is shown as a seperate line. I want to have a stacked area fill.

The table below shows the count of incidents on a given date (total to date). On 27-10-05 there have been 3 incidents to date, so I'd like the total graph to be 3 units high, not show two separate lines. No way to do this?
 Code: Date      P5   P4   P3   P2   P1 26-10-05   0   2    0    0   0 27-10-05   0   2    1    0   0 09-12-05   0   2    1    1   2 14-12-05   0   3    1    1   2 23-12-05   0   4   10    4   6 04-01-06   0   4   10    6   6 05-01-06   0   4   13    6   6 18-01-06   0   5   14    6   6 19-01-06   1   6   14    7   6 20-01-06   1   6   15    9   6 24-01-06   1   7   15   10   6 25-01-06   1   7   21   10   7 26-01-06   2   7   21   10   7 27-01-06   2   7   22   11   8
David
Super User

Joined: 24 Oct 2003
Posts: 5668

 Posted: Tue Jan 31, 2006 1:11 pm    Post subject: I can't help with the spread of dates, except to suggest including all dates between the beginning and end, filled with zero values [though that may not be necessary.] The stacking can be done though, with either areas or columns. David.
billyboy
Super User

Joined: 08 Sep 2005
Posts: 504
Location: Belfast, Northern Ireland

 Posted: Tue Jan 31, 2006 1:20 pm    Post subject: I'm not sure exactly what you want but have you tried an Area chart making certain that you have First Column AND First Row set as Labels. Bill_________________OOo-DEV 3.4 -Seamonkey, Firefox & Thunderbird trunk - Win Vista HB ============================================== Creation Answers
jrkrideau
Super User

Joined: 08 Aug 2005
Posts: 6733

Posted: Tue Jan 31, 2006 4:48 pm    Post subject:

mlerutte wrote:
No I did not use an XY chart. Using an XY chart indeed distributes the day correctly but it does not stack the values. Each value is shown as a seperate line. I want to have a stacked area fill.

The table below shows the count of incidents on a given date (total to date). On 27-10-05 there have been 3 incidents to date, so I'd like the total graph to be 3 units high, not show two separate lines. No way to do this?
 Code: Date      P5   P4   P3   P2   P1 26-10-05   0   2    0    0   0 27-10-05   0   2    1    0   0 09-12-05   0   2    1    1   2 14-12-05   0   3    1    1   2 23-12-05   0   4   10    4   6 04-01-06   0   4   10    6   6 05-01-06   0   4   13    6   6 18-01-06   0   5   14    6   6 19-01-06   1   6   14    7   6 20-01-06   1   6   15    9   6 24-01-06   1   7   15   10   6 25-01-06   1   7   21   10   7 26-01-06   2   7   21   10   7 27-01-06   2   7   22   11   8

I think you are trying to do two different things here. One is create a line or as Bill suggests, perhaps an area chart. Perhaps even a stacked bar chart. However if you want to do this the x-axis is a categorical axis. That means that the chart must use the exact dates.

If you want a graph with a continuous scale on the x-axis you need to use an XY graph but that will not allow you to stack anything as far as I can see.

However if all you want is the total for each date just add up the incidents and graph that on a XY graph. You could in fact graph P1 to P 5 and a Total line.
_________________
jrkrideau
Currently using Windows 7 & OOo 3.4.0 and Ubuntu 12.04 & LibreOffice 3.5.2.2
mlerutte
General User

Joined: 23 Jan 2006
Posts: 6
Location: Swalmen, The Netherlands

 Posted: Tue Feb 07, 2006 1:57 pm    Post subject: I now total it by week, this is a acceptable workaround.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum