(Kumottu muokkaus 873012, jonka teki Molindho (keskustelu)) Merkkaus: Kumoaminen |
p (Tekstin korvaus – ”|limit=1000” muotoon ”|limit=2000”) |
||
| (3 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
| Rivi 8: | Rivi 8: | ||
setTimeout( function(){ <!--{$id|default:drawIceSitChart|escape:'html'}-->_jQueryTest() }, 300); | setTimeout( function(){ <!--{$id|default:drawIceSitChart|escape:'html'}-->_jQueryTest() }, 300); | ||
} else { | } else { | ||
google.load(' | google.charts.load( 'current', { 'packages':[ 'corechart' ], 'language': 'fi' } ); | ||
google.setOnLoadCallback(<!--{$id|default:drawIceSitChart|escape:'html'}-->_func); | google.charts.setOnLoadCallback(<!--{$id|default:drawIceSitChart|escape:'html'}-->_func); | ||
} | } | ||
} | } | ||
| Rivi 16: | Rivi 16: | ||
function <!--{$id|default:drawIceSitChart|escape:'html'}-->_func() { | function <!--{$id|default:drawIceSitChart|escape:'html'}-->_func() { | ||
var id = "<!--{$id|default:drawIceSitChart|escape:'html'}-->"; | |||
var siteName = '<!--{$page|escape:'urlpathinfo'}-->'; | var siteName = '<!--{$page|escape:'urlpathinfo'}-->'; | ||
var lang = '<!--{$lang|default:fi|escape:'urlpathinfo'}-->'; | var lang = '<!--{$lang|default:fi|escape:'urlpathinfo'}-->'; | ||
| Rivi 27: | Rivi 27: | ||
searchStr += encodeURI("[[Jäätilanne::2||3||5]]"); | searchStr += encodeURI("[[Jäätilanne::2||3||5]]"); | ||
searchStr += encodeURI("[[Jään paksuus::>0]]"); | searchStr += encodeURI("[[Jään paksuus::>0]]"); | ||
searchStr += encodeURI("|?Päivämäärä|?Jäätilanne|?Jään paksuus|?Tiedosto|?Lisätiedot|sort=Päivämäärä|limit= | searchStr += encodeURI("|?Päivämäärä|?Jäätilanne|?Jään paksuus|?Tiedosto|?Lisätiedot|sort=Päivämäärä|limit=2000"); | ||
searchStr += '&format=json'; | searchStr += '&format=json'; | ||
jQuery.ajax({ | jQuery.ajax({ | ||
| Rivi 340: | Rivi 340: | ||
backgroundColor: { fill:'transparent' }, | backgroundColor: { fill:'transparent' }, | ||
crosshair: { trigger: 'both' }, | crosshair: { trigger: 'both' }, | ||
chartArea: { top: 10, left: 80, width: (jQuery('# | chartArea: { top: 10, left: 80, width: (jQuery('#' + id + '_ice_chart_div').width() - 80 - 20), height: (jQuery('#' + id + '_ice_chart_div').height() - 50 - 10), backgroundColor: { stroke: '#ccc', strokeWidth: 1, fill: '#daf0fa' } }, | ||
tooltip: { isHtml: true } | tooltip: { isHtml: true } | ||
}; | }; | ||
var chart = new google.visualization.ComboChart(document.getElementById(' | var chart = new google.visualization.ComboChart(document.getElementById(id + '_ice_chart_div')); | ||
chart.draw(dataTable, options); | chart.draw(dataTable, options); | ||
jQuery( window ).resize(function() { | jQuery( window ).resize(function() { | ||
options.chartArea.width = (jQuery('#' + id + '_ice_chart_div').width() - 80 - 20); | |||
options.chartArea.width = (jQuery('# | options.chartArea.height = (jQuery('#' + id + '_ice_chart_div').height() - 50 - 10); | ||
options.chartArea.height = (jQuery('# | |||
chart.draw(dataTable, options); | chart.draw(dataTable, options); | ||
}); | }); | ||
| Rivi 419: | Rivi 418: | ||
<!--Div that will hold the pie chart--> | <!--Div that will hold the pie chart--> | ||
<div style="Xbackground-color: #c1e7f7; height: 300px;" id=" | <div style="Xbackground-color: #c1e7f7; height: 300px;" id="<!--{$id|default:drawIceSitChart|escape:'html'}-->_ice_chart_div"></div> | ||
</includeonly> | </includeonly> | ||


