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 

Error Bars with Dates

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



Joined: 01 Jun 2017
Posts: 1

PostPosted: Thu Jun 01, 2017 11:43 am    Post subject: Error Bars with Dates Reply with quote

I'm trying to create an error bar with a +/- 3 days from the date point on my graphs. How does one go about doing this?
Back to top
View user's profile Send private message
David
Site Admin


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

PostPosted: Thu Jun 01, 2017 12:52 pm    Post subject: Reply with quote

The date column is dealt with numerically as an unix date, i.e. seconds from January 1st 1970. So 3 days is really the numerical value 3*24*3600

Error bars get data from the table with one value per row. If you want to create them either as a constant or percentages of values you need to create an expression column.

That is, create a column "error" and specify the expression

3*24*3600

Only doing that will prompt you for the length of the column, since DG can't infer the length from the column. If you use a column in the expression, it will be used to figure out the length, so if you have a column called "value" you can use the trick

value*0 + 3*24*3600

This will use the length and mask from value but since you are multiplying it by 0 it won't affect the value.

You can also use a global variable to extract the length of the column and then use that global variable in the expression to specify the number of rows.

Then use the error column in the Error bar settings for the Point or Plot command.


David
Back to top
View user's profile Send private message Send e-mail
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