Ero sivun ”Widget:Ice break-up graph” versioiden välillä
Järvi-meriwikistä
p (Tekstin korvaus – ”google.setOnLoadCallback(” muotoon ”google.charts.setOnLoadCallback(”) |
|||
(5 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 57: | Rivi 57: | ||
zi++; | zi++; | ||
resultItem = request.query.results[i].printouts; | resultItem = request.query.results[i].printouts; | ||
− | + | ||
obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0].timestamp)); | 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(); } | ||
Rivi 129: | Rivi 129: | ||
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>'; |