I am using following example:
http://dojo.telerik.com/AkIwo
When I select the time I get values like 12:00 / 12:30 / 13:00 - so half hour gaps.
Does anyone know how to define the "gaps", hence I want to change it to 12:00 / 12:15 / 12:30 / 12:45 and so on?
Cheers
Here is the answer (I was looking at the wrong doc, sorry)
$("#dateTimePicker").kendoDateTimePicker({
interval: 15
});
Simply set the interval property:
$(document).ready(function () {
// create DateTimePicker from input HTML element
$("#datetimepicker").kendoDateTimePicker({
value:new Date(),
interval: 15
});
});
Here's the Dojo
You can use interval for time picker:
$("#timepicker").kendoTimePicker({
interval: 10 //the interval you want to have between two time gap
});
Related
is it just me or is the transition in this chart from days to hours really harsh and a bit confusing as well? I took this of a demo from amcharts. Did i miss something? Do i have any chance to make it smoother and how? In the example the transitions from month to week and week to days and days to day, they all work fine. But zooming in further from days it jumps directly to hours. I tried already a lot of variations with groupIntervals, groupCount and valueYGrouped. I know the transition in amCharts4 is definitely smoother by default (going to groups of hours first and also not jumping all over the place).
https://codepen.io/robjsky/pen/VwrxQMz
// Create X-Axis
var xAxis = chart.xAxes.push(
am5xy.DateAxis.new(root, {
groupData: true,
baseInterval: { timeUnit: "minute", count: 1 },
groupCount: 30,
renderer: am5xy.AxisRendererX.new(root, {})
})
);
How can I make axis labels in the HOURS: MINUTES format (10:00 for example), if the data on the axis are represented as integers in the range [0...N]?
For example:
range [0..43200]
axis labels: 00:00 04:00 08:00 12:00
seconf example:
range [28800..172800]
axis labels: 08:00 16:00 24:00 08:00 16:00 24:00
When I use code:
set xdata time
set format x "%H:%M"
it does not work correctly :(
I assume you want that the time does not wrap at 24:00? i.e. 32:00 40:00 48:00 instead of 08:00 16:00 24:00 ?
See help time_specifiers
Simple test code:
reset session
set xdata time
set format x "%tH:%tM"
set xrange [0:180000]
plot x
which gives:
This option worked!
set xtics format "%tH:%tM" time
Unfortunately, it gives for the range [0: 172800] the values 0:00 - 48:00, and I would like 0:00-23:00-0:00-23:00
I'm using the javascript rickshaw library to visualize realtime data in a diagram. Does anyone know why a time stamp of the x-Axis starts at "01 Jan 1970 00:00:00 GMT" instead of the current time stamp?
Here the x-Axis time stamp is the current time which I'd like to use:
http://jsfiddle.net/n68teee2/
Here in my project the time stamp is set to the wrong unix time stamp above:
http://jsfiddle.net/t2cch5rw/1/
I think the affected code could be the following lines:
var hoverDetail = new Rickshaw.Graph.HoverDetail( {
graph: graph
} );
var annotator = new Rickshaw.Graph.Annotate( {
graph: graph,
element: document.getElementById('timeline')
} );
Thanks.
I've found the origin of the problem. The function Rickshaw.Fixtures.RandomData(150) adds timestamps to the data. The time stamp is defined in Rickshaw.Fixtures.Time.
Having the current scale level for the time scale from d3.event.scale (e.g. 0.5 or 1.5), is there any rule of how to convert it to human readable form, like - day, week, month or year?
UPDATE:
Here is a draft of what I'm working on: http://cdpn.io/gzfyj. I'm basically seeking for a way to get time boundaries after zooming or panning and the zoom factor in above mentioned identifiers.
After zooming,
var width = x.domain();
var dur = width[1] - width[0];
will return the width of the scale in milliseconds. Then this duration can be converted to any form you like.
This is an working example where I have used moment.js to humanize the duration at the bottom of the graph: http://codepen.io/musically_ut/pen/DJqtw
var ext = x.domain();
var duration = moment.duration(ext[1] - ext[0]).humanize();
chart
.select("text.duration")
.text(duration);
I need to display only time labels on xAxis. I'm using Highcharts and don't fully understand how to do it. On xAxis there should be time labels in format like 21:00. I do not need dates, only time is needed. In addition, the difference between two labels should be 00:30 (half an hour) or 01:30 and it should be zoomable. My PHP script writes some value in database every half an hour and I need to display it on a graph. Sorry for my poor English, I'm Russian. Any help would be appreciated :)
In xAxis of your chart you need to provide tickinterval and dateTimeLabelFormats. Following code gives the tick interval of 1.5 hours. You can change that to any number of hours you want by replacing 1.5 in tickInterval: 1.5 * 3600 * 1000,
xAxis: {
type: 'datetime',
//Sets tickInterval to 24 * 3600 * 1000 if display is by day
tickInterval: 1.5 * 3600 * 1000,
dateTimeLabelFormats : {
day: '%H:%M'
}
}