Ero sivun ”Widget:Temperature graph” versioiden välillä
Järvi-meriwikistä
Rivi 149: | Rivi 149: | ||
xi++; | xi++; | ||
resultItem = request.query.results[i].printouts; | resultItem = request.query.results[i].printouts; | ||
− | dataRow = new Array(); | + | dataRow = new Array(); |
− | |||
val = resultItem['Pintaveden lämpötila'][0].value; | val = resultItem['Pintaveden lämpötila'][0].value; | ||
obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0].timestamp)); | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0].timestamp)); | ||
dataRow[0] = obsDate.getDayOfYear(); | dataRow[0] = obsDate.getDayOfYear(); | ||
− | tooltip = '<div style="padding: 8px;">' + obsDate.toLocaleDateString() + ': ' + val + ' °C'; | + | tooltip = '<div style="padding: 8px; white-space: nowrap;">' + obsDate.toLocaleDateString() + ': ' + val + ' °C'; |
if (imagesArr[i]) { | if (imagesArr[i]) { | ||
tooltip += '<br />' + '<div class="tempTooltipDiv" id="tempTooltipDiv_' + i + '" style="width: 144px; height: 144px;"><img class="tempTooltipImg" id="tempTooltipImg_' + i + '" style="max-width: 144px; max-height: 144px;" src="' + imagesArr[i] + '" /></div>'; | tooltip += '<br />' + '<div class="tempTooltipDiv" id="tempTooltipDiv_' + i + '" style="width: 144px; height: 144px;"><img class="tempTooltipImg" id="tempTooltipImg_' + i + '" style="max-width: 144px; max-height: 144px;" src="' + imagesArr[i] + '" /></div>'; |