Ero sivun ”Widget:Ice break-up river graph” versioiden välillä
Järvi-meriwikistä
p (Tekstin korvaus – ”google.setOnLoadCallback(” muotoon ”google.charts.setOnLoadCallback(”) |
|||
(2 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 13: | Rivi 13: | ||
setTimeout( function(){ <!--{$id|default:drawIburChart|escape:'html'}-->_jQueryTest() }, 300); | setTimeout( function(){ <!--{$id|default:drawIburChart|escape:'html'}-->_jQueryTest() }, 300); | ||
} else { | } else { | ||
− | google.load(' | + | google.charts.load( 'current', { 'packages':[ 'corechart' ], 'language': 'fi' } ); |
− | google.setOnLoadCallback(<!--{$id|default:drawIburChart|escape:'html'}-->_func); | + | google.charts.setOnLoadCallback(<!--{$id|default:drawIburChart|escape:'html'}-->_func); |
} | } | ||
} | } | ||
Rivi 59: | Rivi 59: | ||
resultItem = request.query.results[i].printouts; | resultItem = request.query.results[i].printouts; | ||
− | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0])); | + | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0].timestamp)); |
if (obsDate.getFullYear() < firstYear) { firstYear = obsDate.getFullYear(); } | if (obsDate.getFullYear() < firstYear) { firstYear = obsDate.getFullYear(); } | ||
if (obsDate.getFullYear() > lastYear) { lastYear = obsDate.getFullYear(); } | if (obsDate.getFullYear() > lastYear) { lastYear = obsDate.getFullYear(); } | ||
Rivi 104: | Rivi 104: | ||
resultItem = request.query.results[i].printouts; | resultItem = request.query.results[i].printouts; | ||
− | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0])); | + | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0].timestamp)); |
sigma1 += (obsDate.getFullYear() - yearMean) * (obsDate.getDayOfYear() - daysMean); | sigma1 += (obsDate.getFullYear() - yearMean) * (obsDate.getDayOfYear() - daysMean); | ||
Rivi 123: | Rivi 123: | ||
zi++; | zi++; | ||
resultItem = request.query.results[i].printouts; | resultItem = request.query.results[i].printouts; | ||
− | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0])); | + | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0].timestamp)); |
dataRow = new Array(); | dataRow = new Array(); | ||
dataRow[0] = obsDate.getFullYear(); | dataRow[0] = obsDate.getFullYear(); |