Ero sivun ”Widget:Leväbarometri” versioiden välillä
Järvi-meriwikistä
(14 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 14: | Rivi 14: | ||
setTimeout( function(){ <!--{$id|default:algalbarochart|escape:'html'}-->_jQueryTest() }, 300); | setTimeout( function(){ <!--{$id|default:algalbarochart|escape:'html'}-->_jQueryTest() }, 300); | ||
} else { | } else { | ||
− | + | <!--{$id|default:algalbarochart|escape:'html'}-->_func(); | |
− | |||
} | } | ||
} | } | ||
Rivi 23: | Rivi 22: | ||
// Load the Visualization API and the corechart package. | // Load the Visualization API and the corechart package. | ||
− | google.charts.load('current', {'packages':['corechart']}); | + | google.charts.load('current', {'packages':['corechart'] }); |
// Set a callback to run when the Google Visualization API is loaded. | // Set a callback to run when the Google Visualization API is loaded. | ||
Rivi 122: | Rivi 121: | ||
function i18n( text, lang ) { | function i18n( text, lang ) { | ||
− | |||
− | |||
var o = {}; | var o = {}; | ||
Rivi 142: | Rivi 139: | ||
} | } | ||
} | } | ||
− | + | ||
return response; | return response; | ||
Rivi 268: | Rivi 265: | ||
function drawVisualization() { | function drawVisualization() { | ||
− | + | console.log( Rdata1 ); | |
if (meri != "1") { | if (meri != "1") { | ||
Rivi 279: | Rivi 276: | ||
data1 = new google.visualization.DataTable(); | data1 = new google.visualization.DataTable(); | ||
− | data1.addColumn('string', | + | data1.addColumn('string', 'Viikko'); |
data1.addColumn('number', vuosi); | data1.addColumn('number', vuosi); | ||
data1.addColumn({type:'string', role:'tooltip'}); | data1.addColumn({type:'string', role:'tooltip'}); | ||
Rivi 309: | Rivi 306: | ||
vAxis: { viewWindowMode:'explicit', viewWindow:{ max:0.8, min:0}, gridlines: { count: '4', color: '#c1e7f7' }}, | vAxis: { viewWindowMode:'explicit', viewWindow:{ max:0.8, min:0}, gridlines: { count: '4', color: '#c1e7f7' }}, | ||
//{maxValue: 0.8}, | //{maxValue: 0.8}, | ||
− | hAxis: {title: | + | hAxis: {title: i18n( 'Viikko', lang ), slantedText: false, maxAlternation: 1, titleTextStyle: { fontName: '"Arial"' } }, |
backgroundColor: { fill: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->", stroke: "#c1e7f7", strokeWidth: 0 }, | backgroundColor: { fill: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->", stroke: "#c1e7f7", strokeWidth: 0 }, | ||
chartArea: { top: 20, left: 30, backgroundColor: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->" }, | chartArea: { top: 20, left: 30, backgroundColor: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->" }, | ||
Rivi 336: | Rivi 333: | ||
data2 = new google.visualization.DataTable(); | data2 = new google.visualization.DataTable(); | ||
− | data2.addColumn('string', | + | data2.addColumn('string', 'Viikko'); |
data2.addColumn('number', vuosi); | data2.addColumn('number', vuosi); | ||
data2.addColumn({type:'string', role:'tooltip'}); | data2.addColumn({type:'string', role:'tooltip'}); | ||
Rivi 347: | Rivi 344: | ||
data2.addColumn('number', i18n( 'Liian vähän havaintoja', lang )); | data2.addColumn('number', i18n( 'Liian vähän havaintoja', lang )); | ||
data2.addColumn({type:'string', role:'tooltip'}); | data2.addColumn({type:'string', role:'tooltip'}); | ||
− | data2.addColumn('number', i18n( ' | + | data2.addColumn('number', i18n( 'Määritelty viikko', lang )); |
data2.addColumn({type:'string', role:'tooltip'}); | data2.addColumn({type:'string', role:'tooltip'}); | ||
data2.addColumn('number', i18n( 'Sinileväbarometri', lang ) + ' 0'); | data2.addColumn('number', i18n( 'Sinileväbarometri', lang ) + ' 0'); | ||
Rivi 366: | Rivi 363: | ||
vAxis: { viewWindowMode:'explicit', viewWindow:{ max: 0.8, min:0 }, gridlines: { count: 4, color: '#c1e7f7' }}, | vAxis: { viewWindowMode:'explicit', viewWindow:{ max: 0.8, min:0 }, gridlines: { count: 4, color: '#c1e7f7' }}, | ||
//{maxValue: 0.8}, | //{maxValue: 0.8}, | ||
− | hAxis: {title: | + | hAxis: {title: i18n( 'Viikko', lang ), slantedText: false, maxAlternation: 1, titleTextStyle: { fontName: '"Arial"' } }, |
backgroundColor: { fill: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->", stroke: "#c1e7f7" }, | backgroundColor: { fill: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->", stroke: "#c1e7f7" }, | ||
chartArea: { top: 20, left: 30, backgroundColor: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->" }, | chartArea: { top: 20, left: 30, backgroundColor: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->" }, |