visualdatatools.com Forum Index visualdatatools.com
Discussion for DataTank and DataGraph
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Setting a range with Date as X Axis

 
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Getting Started
View previous topic :: View next topic  
Author Message
PaulZ



Joined: 09 May 2011
Posts: 2
Location: Sydney Australia

PostPosted: Mon May 09, 2011 10:09 pm    Post subject: Setting a range with Date as X Axis Reply with quote

Hi

I have a lot of economic data that I want to display as line graphs with the date on the X axis. Some of the data is historic (say 1990 to 2010) and some is projected (say 2011 to 2020).

I want to make the difference between historic and projected data very clear so I thought I could set a range from 2011 to 2020 and then put a color behind the projected lines. To do this I set a range with X = Interval and Y = Everything. Under X the xmin,xmax appeared so I tried to enter the dates directly which didn't work, then tried to define Global Variables as dates. Interestingly the help screen showed a "Date" button on the global variable tool, but my version doesn't seem to allow dates as variables.

To summarise, is setting a range the best way to illustrate the difference between two blocks of data as I explained? If so, how do I get the range function to recognise a date as a parameter?

Thanks
Back to top
View user's profile Send private message
David
Site Admin


Joined: 25 Nov 2006
Posts: 1967
Location: Chapel Hill, NC

PostPosted: Tue May 10, 2011 7:55 am    Post subject: Reply with quote

To enter in a date value for the range, use the format

yyyy:mm:dd

So if you want the range to be from 2011 to 2020, you can do

2011:1:1,2020:1:1

or even

2011:1:1,∞

The date expression is on the Expression Help page.


I removed the date entry from the parameter menu. It is still there for backward compatibility purposes but I ran into enough oddities with the built in UI widget that I decided that it was not worth it. You can actually find it in one of the templates

dgraph://template/Dates/Spiffed%20up.dgraph

And then copy it to your file or drag it over.

David
Back to top
View user's profile Send private message Send e-mail
PaulZ



Joined: 09 May 2011
Posts: 2
Location: Sydney Australia

PostPosted: Tue May 10, 2011 8:21 pm    Post subject: Reply with quote

David

Thanks for that, it worked very well. I appreciate the quick turnaround on support questions and your helpful attitude towards your users.

regards
Back to top
View user's profile Send private message
Beast Of Bodmin



Joined: 02 Dec 2010
Posts: 3

PostPosted: Mon Jan 15, 2018 4:54 pm    Post subject: Reply with quote

Heh. I "solved" that same problem by converting my starting date to seconds since 1970.1.1
Back to top
View user's profile Send private message
andr



Joined: 13 Nov 2018
Posts: 1

PostPosted: Tue Nov 13, 2018 9:12 am    Post subject: Reply with quote

Hi

Your suggestion for the date (2011:1:1,2020:1:1 ) works fine.
How can I add also a specified time?
e.g.: 2018.11.13 13:12

--> Ok, I found it out:

You can adjust the range with the mouse or you can type:
2018.11.13:13:12
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Getting Started All times are GMT - 3 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group