Highcharts datetime column chart - interval data - highcharts

So I was wondering, is it possible, to show datetime values on x-axis as intervals.
For example, I have data that is saved to the database at 9:00, but if the hourly view of the data is chosen, that means that the data was collected from 8:00 to 9:00 and just saved at exactly 9:00. So when the column is rendered above the x-axis value 9:00, that is not true. It should be rendered on the 'category' 9:00 (from 8:00 to 9:00).
To sum up, I need something that would place that ONE column BETWEEN 8:00 and 9:00, or in general, between the given datetime value passed and the value that is one value less (before).
Is it possible to pass datetime intervals to a datetime axis?
Thanx for the help in advance!

I found the answer.
http://api.highcharts.com/highcharts#plotOptions.area.pointPlacement
The pointPlacement option set to "between" serves exactly this purpose.
I've scanned the Highchart Options Reference multiple times before, but must have missed it.

I would recommend using the pointRange option: http://api.highcharts.com/highcharts#plotOptions.column.pointRange
Using your example, if you set the data point to 8:30, and set a pointRange of 1 hour, it will span the block from 8:00 to 9:00

Related

Adjusting Tableau Date Values to per month

I'm looking to adjust the basic Tableau time frame from the ISO/Gregorian format to a customized one. Currently, I'm displaying data in a line chart by Month and week. The week format is based on 52 weeks ie 'Week 43' = 10/17-10/23. I would like to display the week time line relative to its given month ie the column would read October 'Week 1' = 10/01 - 10/07, 'Week 2' = 10/08-10/14 and the following month would reset the weeks to start at zero. Is this achieved by a parameter?
There are a few features in Tableau that will help you with this.
Read through the on-line help about creating custom dates, setting fiscal years for date fields. The custom date feature is based on the Tableau function DATE_TRUNC() so you might want to read about that as well.
The short answer though is - right click on your date field in the data pane on the left margin, then set the fiscal year start under the default properties and create a custom date at the week level. You want to create a date value, not a date part.
Then use your custom date to build your viz, and change it between discrete and continuous depending on how you want to present your values.

Can Google Data Studio do time-series graphs at the hour level?

Every example of a time-series graph I've seen for Google Data Studio has a metric plotted per day. Is there any way to configure the granularity of the time axis (hour, month, etc)?
I want to show the count of events per hour throughout one day.
My columns are in bigquery as types datetime:TIMESTAMP and count:INTEGER
This is old, but its high in search results, and I found the correct answer here: https://www.en.advertisercommunity.com/t5/Data-Studio/Is-it-possible-to-aggregate-by-hour/td-p/1104815
Click the pencil next to the datasource, on your timestamp, click on the type column, and change "Date(YYYYMMDD" to another format, such as DATE HOUR("YYYYMMDDHH") to get hourly aggregation on the graphs.
Now, there seems to be a straightforward way:
Assuming that you have a Time Series plot, use Timestamp for your dimension and want to show hourly aggregated values.
Select the dimension's preferences:
Change Type to Date Hour
Edit: Based on new updates to Data Studio, #Brian's answer above is the correct one.
You can create a calculated field with the TODATE funciton. Example formula can be TODATE(source_field, 'SECONDS', '%Y%m%d%H'). Then this field should be marked as Date(YYYYMMDDHH) in the field editing screen.
There is a way to do this. If the data is broken up hour by hour, make the hour column(s) the Time Dimension. If all of the hour data isn't in a single column, you may want to reformat your data (manually or using a data prep source, your choice). Or you can go into the time setting of the field and change it into hours.

Tooltip with series with several frequencies

In the demo site, there is an example with series comparison (http://www.highcharts.com/stock/demo/compare).
In this example every series has values at same date times.
What I have to plot is several series but each series has there own frequency (ie : one daily, one hourly and one every 10 minutes).
It works but the tooltip displays :
the 3 values when we are over a full day date time
the hourly and the 10' values when we are over full hour date time
only the 10' value when we are over a 10' date time
Would it be possible to always displays the 3 values?
Or by extrapolating the intermediate values (best) or by displaying 3 date times/values in the same tooltip.
Best regards
Unfortunately it is not build-in, so you need to use tooltip formatter, find the closest point of current (by loops on each serie / each point, comparing x value) and then return values.

Datetime and Time Zones - OpenERP 7

I'm keeping the current date in a model using a datetime field in which I am indicating default to take the current date as a value.
_defaults = {
'f_inicio' : lambda *a: datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
}
Assuming that the current date is '07/10/2013 17:24:05 ', in the view is the date '07/10/2013 12:24:05' and rectified in the database and the date is '07/10/2013 17:24:05'; gather that this subtracting five hours. The user can set the time zone 'America/Bogota', Colombia is in the region (GTM - 5:00). But do not understand how to properly show when the user since I get a totally different value that should show. Apparently this taking as 'GTM 0' the GTM Colombia. Taking the approximate date create_date field that should have given me as default is '2013-10-07 22:24:05.384'.
Anyone have any idea what may be happening, really appreciate any help on this issue that is driving me crazy.
This drived me too crazy in the past. This is a real simple issue.
The date stored in the database is UTC (GMT-0) timezone. Assume that the person is set with timezone GMT - 5:00, then while storing the value to the database, the date will be added with 5 hrs (exactly 5, not little more or little less) and thus we get the UTC time to store into the database. Now when displaying the same it will check for the users timezone and it finds that its GMT - 5:00 so the database time will be subtracted with 5 (again exactly 5, not little more or little less) and displayed the user.
This will be great for system which is used in different timezones. So the understanding is the input is taken in the user's timezone stored in UTC(GMT-0) and displayed to user's timezone (even if the user viewing is in the different timezone the time will be accurate to their timezone)
Note: if the user is not set with the timezone the browsers timezone is considered and will be used with the warning icon on the top corner
That's it. Hope this gives u better clarity!!

What is the correct type I should use to store a date up to the minute?

I want to store the date of an event in my database, but I want to do so without storing informations about seconds or anything smaller than seconds. Using Rails, in my migration I have the option to create a date column or a datetime column, the first one of which is too less accurate, and the second one is too much (up to the second and less). Which type should I choose to store such a date? Currently I'm using datetime and setting the seconds to a fixed value (e.g. 0) manually each time some date is set in the model.
Something like this:
self.date ||= Time.now.change(:sec => 0)
Am I totally out of track? Should I just use an integer field for each component of the date instead? (year, month, day, etc...) Or is datetime the correct type but I'm not understanding the purpose of it? (I think it's meant for timestamps and such things where seconds matter)
datetime is the correct type. And be sure to store it without time zone at time zone UTC:
http://derickrethans.nl/storing-date-time-in-database.html
At your option, use an SQL trigger to round your date to the minute on insert/update. It'll simplify your ruby code.

Resources