Highcharts: Synchronise irregular data series from same day different year - javascript

I am comparing temperatures today with the same day last year. I am retrieving the data from a database (via json) and each series has different times (and timestamps). Today's series has datapoints every 10 minutes, last year has data points at 00 and 50 minutes past the hour.
I cannot get both series to plot accurately on the x axis.
I have played about with the pointInterval for last years data to try to get it right but it only ends up looking approximately right.
pointInterval: 3600 * 1000 / 2.05
Is there a way to accurately plot points in both series against the x axis?
Please see jsfiddle

I've managed it.
I needed to remove the pointStart and pointInterval from each series, change the year of the 'last year' series to reflect this year and then change to tooltip to show only the hour and minute.

Related

Having trouble displaying a date X axis, How do I get all dates, not just where data points are plotted?

I have a chart to display values across time, but there aren't data points for each day. The chart is just displaying dates on the X axis where data points exist. I want each date to have a vertical line, and the day displayed below for every day in the range (unless overlapping).
I'm using chart.ja version 4.2.1
Extra Points :-)
I would also know how to keep the dates from overlapping when a large range (lots of dates) is being plotted.
Lastly, is it possible to display the dates on three lines, where the top line is the day, the second line shows the month name (once) in the middle of the month, and the third line shows the year in the middle of the year.

Unable to display name of every row in heatmap

I am creating a heat map using html, and JavaScript.
My x axis is having 24 hours, and y axis is having all the days of year, 365 days.
But on the y axis I am unable to display the name of every date. It is displaying the name with some step size. Can anyone solve this?

Highcharts tickinterval set to one minute shows only one date

I have a highcharts graph of speed(y axis) and time( x axis), each second posts a new speed, which means in an hour I will have 3600 data point, and that is a lot. I found out about tickInterval and the ability to shorten the amount of time drawn on the x axes, but as soon as I set it the ticks labels disappear and it shows only the first minute label
Here are two graph comparison of how it look like with tickInterval and without
without tickInterval:
With tickInterval:
I would have expected to see a tick label on x axis every minute but instead I see only this ? hmm ?
here is my code with less data points than I have:
http://jsfiddle.net/cyc89zop/1/
How can I fix this problem ?
2 things:
1) You have specified your axis type as "Time" which is not a valid option. What you want is datetime.
2) You have then specified categories for the x axis. categories and datetime axis types are mutually exclusive - you must use only one or the other, not both.
To get the proper dates with a datetime axis type, you specify either
1) an x value for each data point,in millisecond epoch time, or
2) a pointStart and pointInterval property for the series
http://api.highcharts.com/highcharts/plotOptions.series.pointStart
http://api.highcharts.com/highcharts/plotOptions.series.pointInterval

Set highcharts x-axis

I'm having an issue with HighCharts where I have a lot of data, and would like to indicate the X-axis in "hours" instead of "minutes". So it only displays every 60 minutes as 1 hour.
- Right now it display every 10 data in the X-axis. I need it to display every 60 instead.
On this link you can see a picture of what I mean: https://www.dropbox.com/s/ln2mkl0tb1444sp/xaxis.png?dl=0
How do I define the X-axis only to display every 60 “minutes” as 1 “hour”… 2 hours… 3 hours etc.

d3js: time scaling and "1901"

I'm working with a time-based scatterplot and am using data which only parses times by month, hour and day. On my axis labels, I'm getting "1901". D3 seems to be choosing a year and displaying it. How can I easily get rid of this? I don't want any year displayed:
1901 example http://lmnts.lmnarchitects.com/wp-content/uploads/2014/04/2014-04-01-09_31_30-127.0.0.1_8020_Climate3_seattle-winter-temps.html.jpg
you need to set the tickFormat of your axis to display only months and days. The tickFormat receives a function that takes a date and returns a string. You can use d3.time.format to set the tick format:
var axis = d3.svg.axis()
// ... set more attributes
.tickFormat(d3.time.format('%b %d')); // Abbreviated month and decimal day (Apr 01)
Regards,

Categories

Resources