Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| (70 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
| Rivi 1: | Rivi 1: | ||
<includeonly> | <includeonly> | ||
<div class="algalbaroContainer" id="<!--{$id|default:algalbaro|escape:'html'}-->_container" style="height: <!--{$height|default: | <div class="algalbaroContainer" id="<!--{$id|default:algalbaro|escape:'html'}-->_container" style="height: <!--{$height|default:500px|escape:'html'}-->;"> | ||
<div class="chartdiv" id="<!--{$id|default:algalbaro|escape:'html'}-->_chartdiv1"></div> | <div class="chartdiv" id="<!--{$id|default:algalbaro|escape:'html'}-->_chartdiv1"></div> | ||
<div class="chartdiv" id="<!--{$id|default:algalbaro|escape:'html'}-->_chartdiv2"></div> | <div class="chartdiv" id="<!--{$id|default:algalbaro|escape:'html'}-->_chartdiv2"></div> | ||
| Rivi 9: | Rivi 9: | ||
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> | <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
function <!--{$id|default:algalbarochart|escape:'html'}-->_jQueryTest() { | |||
if ( typeof window.jQuery == 'undefined' || typeof queryApi == 'undefined' ) { | |||
setTimeout( function(){ <!--{$id|default:algalbarochart|escape:'html'}-->_jQueryTest() }, 300); | |||
} else { | |||
<!--{$id|default:algalbarochart|escape:'html'}-->_func(); | |||
} | |||
} | |||
setTimeout( function(){ <!--{$id|default:algalbarochart|escape:'html'}-->_jQueryTest() }, 300); | |||
function <!--{$id|default:algalbarochart|escape:'html'}-->_func() { | |||
// Load the Visualization API and the corechart package. | |||
google.charts.load('current', {'packages':['corechart'] }); | |||
// Set a callback to run when the Google Visualization API is loaded. | |||
google.charts.setOnLoadCallback( <!--{$id|default:algalbarochart|escape:'html'}-->_init ); | |||
} | |||
function <!--{$id|default:algalbarochart|escape:'html'}-->_init() { | |||
var today = new Date(); | |||
var vuosi = <!--{$vuosi|default:0|escape:'html'}-->; | |||
if (vuosi == 0) { vuosi = (today.getFullYear()); } | |||
var viikko = <!--{$viikko|default:100|escape:'html'}-->; | |||
if (viikko == 100) { viikko = today.getWeek(); } | |||
var vertaa = <!--{$vertaa|default:undefined|escape:'html'}-->; | |||
var meri = <!--{$meri|default:2|escape:'html'}-->; | |||
var ely = "<!--{$ely|default:xxx|escape:'html'}-->"; | |||
var showTitle = <!--{$showTitle|default:1|escape:'html'}-->; | |||
//elySearch = ely.split(' ').join('%20'); | |||
//elySearch= elySearch.split('ä').join('%C3%A4'); | |||
//elySearch= elySearch.split('ö').join('%C3%B6'); | |||
var elySearch = encodeURI(ely); | |||
var minweek = <!--{$minweek|default:23|escape:'html'}-->; | |||
var maxweek = <!--{$maxweek|default:39|escape:'html'}-->; | |||
var lang = '<!--{$lang|default:fi|escape:'html'}-->'; | |||
if (ely == "xxx") { ely = undefined; } | |||
var successCount = 0; | |||
var options1; | |||
var data1; | |||
var chart1; | |||
var options2; | |||
var data2; | |||
var chart2; | |||
var Rdata1 = new Array(); | |||
var Rdata2 = new Array(); | |||
for (i=minweek; i<=maxweek; i++) { | |||
Rdata1[(i-minweek)] = [i.toString(), null, "", null, "", null, "", null, "", null, ""]; | |||
Rdata2[(i-minweek)] = [i.toString(), null, "", null, "", null, "", null, "", null, ""]; | |||
} | |||
if (ely != undefined) { | |||
searchStr = "action=ask&query=[[Lev%C3%A4barometridataELY::%3E0]]"; | |||
searchStr += "[[ELY-keskus::" + elySearch + "]]"; | |||
} else { | |||
searchStr = "action=ask&query=[[Lev%C3%A4barometridataUUSI::%3E0]]"; | |||
} | |||
if (meri == "0") { | |||
searchStr += encodeURI("[[Vesistö::Järvi]]"); | |||
} else if (meri == "1") { | |||
searchStr += encodeURI("[[Vesistö::Meri]]"); | |||
} | |||
searchStr += "[[Tyyppi::Viikkoarvo]]"; | |||
searchStr += "[[Vuosi::" + vuosi + "]]"; | |||
searchStr += "[[Viikko::%3E" + minweek.toString() + "]][[Viikko::%3C" + maxweek.toString() + "]]"; | |||
searchStr += encodeURI('|?Viikko|?Leväbarometri|?Vesistö|limit=100'); | |||
searchStr += '&format=json'; | |||
jQuery.ajax({ | |||
type: 'GET', | |||
url: queryApi, | |||
data: searchStr, | |||
success: success, | |||
dataType: 'jsonp' | |||
}); | |||
if (ely != undefined) { | |||
searchStr2 = "action=ask&query=[[Lev%C3%A4barometridataELY::%3E0]]"; | |||
searchStr2 += "[[ELY-keskus::" + elySearch + "]]"; | |||
} else { | |||
searchStr2 = "action=ask&query=[[Lev%C3%A4barometridataUUSI::%3E0]]"; | |||
} | |||
}); | if (meri == "0") { | ||
searchStr2 += encodeURI("[[Vesistö::Järvi]]"); | |||
} else if (meri == "1") { | |||
searchStr2 += encodeURI("[[Vesistö::Meri]]"); | |||
} | |||
if (vertaa == undefined) { | |||
searchStr2 += "[[Tyyppi::Vertailuarvo]][[Vuosi::" + (today.getFullYear()) + "]]"; | |||
} else { | |||
searchStr2 += "[[Tyyppi::Viikkoarvo]][[Vuosi::" + vertaa + "]]"; | |||
} | |||
searchStr2 += "[[Viikko::%3E" + minweek.toString() + "]][[Viikko::%3C" + maxweek.toString() + "]]"; | |||
searchStr2 += encodeURI('|?Viikko|?Tyyppi|?Leväbarometri|?Vesistö|limit=100'); | |||
searchStr2 += '&format=json'; | |||
jQuery.ajax({ | |||
type: 'GET', | |||
url: queryApi, | |||
data: searchStr2, | |||
success: success, | |||
dataType:'jsonp' | |||
}); | |||
function i18n( text, lang ) { | |||
var o = {}; | |||
o[ 'Sinileväbarometri' ] = { 'en': 'Blue-green algal barometer', 'sv': 'Blågrönalgbarometer' }; | |||
o[ 'Sisävedet' ] = { 'en': 'Inland waters', 'sv': 'Inlandsvatten' }; | |||
o[ 'Merialueet' ] = { 'en': 'Sea areas', 'sv': 'Havsområden' }; | |||
o[ 'Viikko' ] = { 'en': 'Week', 'sv': 'Vecka' }; | |||
o[ 'Määritelty viikko' ] = { 'en': 'Specified week', 'sv': 'Angiven vecka' }; | |||
o[ 'Ei levähavaintoja' ] = { 'en': 'No blue-green algae observations', 'sv': 'Inga blögrönalgobservationer' }; | |||
o[ 'Liian vähän havaintoja' ] = { 'en': 'Not enough observations', 'sv': 'För lite observationer' }; | |||
o[ 'Liukuva keskiarvo' ] = { 'en': 'Moving average', 'sv': 'Glidande medelvärde' }; | |||
var response = text; | |||
if ( typeof o[ text ] != 'undefined' ) { | |||
if ( typeof o[ text ][ lang ] != 'undefined' ) { | |||
response = o[ text ][ lang ]; | |||
} | |||
} | |||
return response; | |||
} | |||
function success(request) { | function success(request) { | ||
console.log(request); | |||
//console.log(request); | |||
if (request.query.results != undefined) { | |||
zi = -1; | zi = -1; | ||
for (var i in request.query.results) { | for (var i in request.query.results) { | ||
| Rivi 128: | Rivi 167: | ||
weekSpan = printWeekSpan(vuosi, resultItem.Viikko[0]); | weekSpan = printWeekSpan(vuosi, resultItem.Viikko[0]); | ||
if (resultBaroVal < 0) { | if (resultBaroVal < 0) { | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][5] = 0; | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][6] = weekSpan; | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][6] += '\n' + i18n( 'Liian vähän havaintoja', lang ); | ||
} else if (resultBaroVal == 0) { | } else if (resultBaroVal == 0) { | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][9] = 0; | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][10] = weekSpan; | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][10] += '\n0 - ' + i18n( 'Ei levähavaintoja', lang ); | ||
} else { | } else { | ||
if (resultItem.Viikko[0] == viikko) { | if (resultItem.Viikko[0] == viikko) { | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][7] = resultBaroVal; | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][8] = weekSpan; | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][8] += '\n' + resultBaroStr; | ||
} else { | } else { | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][1] = resultBaroVal; | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][2] = weekSpan; | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][2] += '\n' + resultBaroStr; | ||
} | } | ||
} | } | ||
} else { | } else { | ||
if (resultBaroVal < 0) { | if (resultBaroVal < 0) { | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][3] = 0; | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][4] = i18n( 'Liukuva keskiarvo', lang ) + '\n1998-'; | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][4] += '\n' + i18n( 'Liian vähän havaintoja', lang ); | ||
} else { | } else { | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][3] = resultBaroVal; | ||
if (vertaa == undefined) { | if (vertaa == undefined) { | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][4] = i18n( 'Liukuva keskiarvo', lang ) + '\n1998-'; | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][4] += (today.getFullYear()-1).toString(); | ||
} else { | } else { | ||
date1 = getDateFromYWD(vertaa, resultItem.Viikko[0], 0); | date1 = getDateFromYWD(vertaa, resultItem.Viikko[0], 0); | ||
| Rivi 162: | Rivi 201: | ||
date2Str = date2.getDate() + "." + (date2.getMonth()+1) + "."; | date2Str = date2.getDate() + "." + (date2.getMonth()+1) + "."; | ||
weekSpan = printWeekSpan(vertaa, resultItem.Viikko[0]); | weekSpan = printWeekSpan(vertaa, resultItem.Viikko[0]); | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][4] = weekSpan; //date1Str + '-' + date2Str; | ||
Rdata1[resultItem.Viikko[0]- | Rdata1[resultItem.Viikko[0]-minweek][4] += '\n' + resultBaroStr; | ||
} | } | ||
} | } | ||
| Rivi 176: | Rivi 215: | ||
weekSpan = printWeekSpan(vuosi, resultItem.Viikko[0]); | weekSpan = printWeekSpan(vuosi, resultItem.Viikko[0]); | ||
if (resultBaroVal < 0) { | if (resultBaroVal < 0) { | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][5] = 0; | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][6] = weekSpan; | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][6] += '\n' + i18n( 'Liian vähän havaintoja', lang ); | ||
} else if (resultBaroVal == 0) { | } else if (resultBaroVal == 0) { | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][9] = 0; | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][10] = weekSpan; | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][10] += '\n0 - ' + i18n( 'Ei levähavaintoja', lang ); | ||
} else { | } else { | ||
if (resultItem.Viikko[0] == viikko) { | if (resultItem.Viikko[0] == viikko) { | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][7] = resultBaroVal; | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][8] = weekSpan; //date1Str + '-' + date2Str + vuosi; | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][8] += '\n' + resultBaroStr; | ||
} else { | } else { | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][1] = resultBaroVal; | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][2] = weekSpan; | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][2] += '\n' + resultBaroStr; | ||
} | } | ||
} | } | ||
} else { | } else { | ||
if (resultBaroVal < 0) { | if (resultBaroVal < 0) { | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][3] = 0; | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][4] = i18n( 'Liukuva keskiarvo', lang ) + '\n1998-'; | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][4] += '\n' + i18n( 'Liian vähän havaintoja', lang ); | ||
} else { | } else { | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][3] = resultBaroVal; | ||
if (vertaa == undefined) { | if (vertaa == undefined) { | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][4] = i18n( 'Liukuva keskiarvo', lang ) + '\n1998-'; | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][4] += (today.getFullYear()-1).toString(); | ||
} else { | } else { | ||
date1 = getDateFromYWD(vertaa, resultItem.Viikko[0], 0); | date1 = getDateFromYWD(vertaa, resultItem.Viikko[0], 0); | ||
| Rivi 210: | Rivi 249: | ||
date2Str = date2.getDate() + "." + (date2.getMonth()+1) + "."; | date2Str = date2.getDate() + "." + (date2.getMonth()+1) + "."; | ||
weekSpan = printWeekSpan(vertaa, resultItem.Viikko[0]); | weekSpan = printWeekSpan(vertaa, resultItem.Viikko[0]); | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][4] = weekSpan; //date1Str + '-' + date2Str; | ||
//Rdata2[resultItem.Viikko[0]- | //Rdata2[resultItem.Viikko[0]-minweek][4] += (vertaa).toString(); | ||
Rdata2[resultItem.Viikko[0]- | Rdata2[resultItem.Viikko[0]-minweek][4] += '\n' + resultBaroStr; | ||
} | } | ||
} | } | ||
| Rivi 244: | Rivi 283: | ||
} | } | ||
data1.addColumn({type:'string', role:'tooltip'}); | data1.addColumn({type:'string', role:'tooltip'}); | ||
data1.addColumn('number', 'Liian vähän havaintoja'); | data1.addColumn('number', i18n( 'Liian vähän havaintoja', lang )); | ||
data1.addColumn({type:'string', role:'tooltip'}); | data1.addColumn({type:'string', role:'tooltip'}); | ||
data1.addColumn('number', ' | data1.addColumn('number', i18n( 'Määritelty viikko', lang )); | ||
data1.addColumn({type:'string', role:'tooltip'}); | data1.addColumn({type:'string', role:'tooltip'}); | ||
data1.addColumn('number', ' | data1.addColumn('number', i18n( 'Sinileväbarometri', lang ) + ' 0' ); | ||
data1.addColumn({type:'string', role:'tooltip'}); | data1.addColumn({type:'string', role:'tooltip'}); | ||
data1.addRows(Rdata1); | data1.addRows(Rdata1); | ||
titlevar = 'Sisävedet'; | titlevar = i18n( 'Sisävedet', lang ); | ||
if (ely != undefined) { titlevar += ' (' + ely.replace(' elinkeino-, liikenne- ja ympäristökeskus', '') + ')'; } | if (ely != undefined) { titlevar += ' (' + ely.replace(' elinkeino-, liikenne- ja ympäristökeskus', '') + ')'; } | ||
| Rivi 262: | Rivi 301: | ||
title: titlevar, | title: titlevar, | ||
titlePosition: 'out', | titlePosition: 'out', | ||
titleTextStyle: { fontName: ' | titleTextStyle: { fontName: 'Poppins', fontSize: 15, color: '#005854' }, | ||
vAxis: { viewWindowMode:'explicit', viewWindow:{ max:0.8, min:0}, gridlines: { color: '# | vAxis: { viewWindowMode:'explicit', viewWindow:{ max:0.8, min:0 }, gridlines: { count: '4', color: '#e4e3de' }, textStyle: { fontName: 'Poppins', color: '#005854', italic: false, bold: false }, titleTextStyle: { fontName: 'Poppins', color: '#005854', italic: false, bold: true } }, | ||
hAxis: {title: i18n( 'Viikko', lang ), slantedText: false, maxAlternation: 1, textStyle: { fontName: 'Poppins', color: '#005854' }, titleTextStyle: { fontName: 'Poppins', color: '#005854', italic: false, bold: true } }, | |||
hAxis: {title: | |||
backgroundColor: { fill: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->", stroke: "#c1e7f7", strokeWidth: 0 }, | backgroundColor: { fill: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->", stroke: "#c1e7f7", strokeWidth: 0 }, | ||
chartArea: { top: | chartArea: { top: 30, right: 30, bottom: 40, left: 30, backgroundColor: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->" }, | ||
series: { | series: { | ||
0: {type: "bars", color: '# | 0: {type: "bars", color: '#005854' }, | ||
1: {type: "area", color: '# | 1: {type: "area", color: '#c7e3d2', areaOpacity: 1, lineWidth: 0.5 }, | ||
2: {type: "line", color: '#59B500', pointSize: 10, lineWidth: 0, visibleInLegend: false }, | 2: {type: "line", color: '#59B500', pointSize: 10, lineWidth: 0, visibleInLegend: false }, | ||
3: {type: "bars", color: '#44E522', visibleInLegend: false }, | 3: {type: "bars", color: '#44E522', visibleInLegend: false }, | ||
4: {type: "line", color: '#308fb3', pointSize: 10, lineWidth: 1, visibleInLegend: false } | 4: {type: "line", color: '#308fb3', pointSize: 10, lineWidth: 1, visibleInLegend: false } | ||
}, | }, | ||
legend: {position: 'in', alignment: 'end' }, | legend: { position: 'in', alignment: 'end', textStyle: { color: '#005854' } }, | ||
isStacked: true | isStacked: true | ||
}; | }; | ||
| Rivi 301: | Rivi 339: | ||
} | } | ||
data2.addColumn({type:'string', role:'tooltip'}); | data2.addColumn({type:'string', role:'tooltip'}); | ||
data2.addColumn('number', 'Liian vähän havaintoja'); | 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', ' | data2.addColumn('number', i18n( 'Määritelty viikko', lang )); | ||
data2.addColumn({type:'string', role:'tooltip'}); | data2.addColumn({type:'string', role:'tooltip'}); | ||
data2.addColumn('number', ' | data2.addColumn('number', i18n( 'Sinileväbarometri', lang ) + ' 0'); | ||
data2.addColumn({type:'string', role:'tooltip'}); | data2.addColumn({type:'string', role:'tooltip'}); | ||
data2.addRows(Rdata2); | data2.addRows(Rdata2); | ||
titlevar = 'Merialueet'; | titlevar = i18n( 'Merialueet', lang ); | ||
if (ely != undefined) { titlevar += ' (' + ely.replace(' elinkeino-, liikenne- ja ympäristökeskus', '')+ ')'; } | if (ely != undefined) { titlevar += ' (' + ely.replace(' elinkeino-, liikenne- ja ympäristökeskus', '')+ ')'; } | ||
| Rivi 318: | Rivi 356: | ||
title: titlevar, | title: titlevar, | ||
titlePosition: 'out', | titlePosition: 'out', | ||
titleTextStyle: { fontName: ' | titleTextStyle: { fontName: 'Poppins', fontSize: 15, color: '#005854', bold: true }, | ||
fontSize: 12, | fontSize: 12, | ||
vAxis: { viewWindowMode:'explicit', viewWindow:{ max:0.8, min:0}, gridlines: { color: '# | vAxis: { viewWindowMode:'explicit', viewWindow:{ max: 0.8, min:0 }, gridlines: { count: 4, color: '#e4e3de' }, textStyle: { fontName: 'Poppins', color: '#005854', italic: false, bold: false }, titleTextStyle: { fontName: 'Poppins', color: '#005854', italic: false, bold: true } }, | ||
hAxis: {title: i18n( 'Viikko', lang ), slantedText: false, maxAlternation: 1, textStyle: { fontName: 'Poppins', color: '#005854', italic: false, bold: false }, titleTextStyle: { fontName: 'Poppins', color: '#005854', italic: false, bold: true } }, | |||
hAxis: {title: | backgroundColor: { fill: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->", stroke: "#e4e3de" }, | ||
backgroundColor: { fill: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->", stroke: "# | chartArea: { top: 30, right: 30, bottom: 40, left: 30, backgroundColor: "#<!--{$bgcolor|default:ffffff|escape:'html'}-->" }, | ||
chartArea: { top: | |||
series: { | series: { | ||
0: {type: "bars", color: '# | 0: {type: "bars", color: '#005854' }, | ||
1: {type: "area", color: '# | 1: {type: "area", color: '#c7e3d2', areaOpacity: 1, lineWidth: 0.5 }, | ||
2: {type: "line", color: '# | 2: {type: "line", color: '#aaaaaa', pointSize: 10, lineWidth: 0, visibleInLegend: false }, | ||
3: {type: "bars", color: '#44E522', visibleInLegend: false }, | 3: {type: "bars", color: '#44E522', visibleInLegend: false }, | ||
4: {type: "line", color: '#308fb3', pointSize: 10, lineWidth: 1, visibleInLegend: false } | 4: {type: "line", color: '#308fb3', pointSize: 10, lineWidth: 1, visibleInLegend: false } | ||
}, | }, | ||
legend: {position: 'in', alignment: 'end' }, | legend: {position: 'in', alignment: 'end', textStyle: { color: '#005854' } }, | ||
isStacked: true | isStacked: true | ||
}; | }; | ||
| Rivi 343: | Rivi 380: | ||
height = jQuery('#<!--{$id|default:algalbaro|escape:'html'}-->_container').height(); | height = jQuery('#<!--{$id|default:algalbaro|escape:'html'}-->_container').height(); | ||
width = jQuery('#<!--{$id|default:algalbaro|escape:'html'}-->_container').width(); | width = jQuery('#<!--{$id|default:algalbaro|escape:'html'}-->_container').width(); | ||
if (meri == "2") { | if (meri == "2") { | ||
jQuery('#<!--{$id|default:algalbaro|escape:'html'}-->_chartdiv1').css('height', height/2); | jQuery('#<!--{$id|default:algalbaro|escape:'html'}-->_chartdiv1').css('height', height/2); | ||
| Rivi 380: | Rivi 418: | ||
} | } | ||
} | } | ||
jQuery( window ).on( 'resize', doResize ); | |||
} | } | ||
</script> | </script> | ||
</includeonly> | </includeonly> | ||


