Ero sivun ”Widget:Ice break-up graph” versioiden välillä
Järvi-meriwikistä
p (Tekstin korvaus – ”google.setOnLoadCallback(” muotoon ”google.charts.setOnLoadCallback(”) |
|||
(8 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 13: | Rivi 13: | ||
setTimeout( function(){ <!--{$id|default:drawIceBreakUpChart|escape:'html'}-->_jQueryTest() }, 300); | setTimeout( function(){ <!--{$id|default:drawIceBreakUpChart|escape:'html'}-->_jQueryTest() }, 300); | ||
} else { | } else { | ||
− | google.load(' | + | google.charts.load( 'current', { 'packages':[ 'corechart' ], 'language': 'fi' } ); |
− | google.setOnLoadCallback(<!--{$id|default:drawIceBreakUpChart|escape:'html'}-->_func); | + | google.charts.setOnLoadCallback(<!--{$id|default:drawIceBreakUpChart|escape:'html'}-->_func); |
} | } | ||
} | } | ||
Rivi 56: | Rivi 56: | ||
for (var i in request.query.results) { | for (var i in request.query.results) { | ||
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)); | ||
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 105: | Rivi 106: | ||
//else { freeText = ''; } | //else { freeText = ''; } | ||
− | 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 124: | Rivi 125: | ||
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(); | ||
dataRow[1] = obsDate.getDayOfYear(); | dataRow[1] = obsDate.getDayOfYear(); | ||
− | dataRow[2] = '<div style="padding: 8px;">' + obsDate.inRelationToToday(); | + | dataRow[2] = '<div style="padding: 8px; white-space: nowrap;">' + obsDate.inRelationToToday() + '</div>'; |
if (imagesArr[zi]) { | if (imagesArr[zi]) { | ||
dataRow[2] += '<br />' + '<div class="ibuTooltipDiv" id="ibuTooltipDiv_' + i + '" style="width: 144px; height: 144px;"><img class="ibuTooltipImg" id="ibuTooltipImg_' + i + '" style="max-width: 144px; max-height: 144px;" src="' + imagesArr[zi] + '" /></div>'; | dataRow[2] += '<br />' + '<div class="ibuTooltipDiv" id="ibuTooltipDiv_' + i + '" style="width: 144px; height: 144px;"><img class="ibuTooltipImg" id="ibuTooltipImg_' + i + '" style="max-width: 144px; max-height: 144px;" src="' + imagesArr[zi] + '" /></div>'; |