javascript - Google Line Chart with different Sample Interval -


I am trying to attract several lines on one, but each line has a different data sampling interval - something Every 4 hours, something every 8

The data looks something like this if I mix the intervals together.

  interval, average -8H, average -4H, 0.45, 0.33, 4, 0.21, 8, 0.32, 0.55, 12, 0.65   

The best I can show for the average-4H line at the moment, but due to the average interval, due to the average interval, this is just the number.

A small example of this is the large herd of HTML):

   

I have already tried to empty the empty value, or empty - so far no luck with it.

You automatically calculate the interval values ​​on the fly, the only downside is that these values Will be shown as the number to define the data : on the graph (var i = 0; i & lt; data.rows.length; i ++) on the graph After that you need to run the following {if (Data.rows [i] .c [1] .v == undefined) {data.rows [i]. C [1] .v = (data. Rosh [i-1]. [1] .v + Data.rows [i + 1] .c [1] .v) / 2; }}

Gives this end through each row, checks whether the value is defined or not. If it is not, then it will get a middle point between the next and the last point and it will assume. Here's a job.

Comments