p (Tekstin korvaus – ”google.setOnLoadCallback(” muotoon ”google.charts.setOnLoadCallback(”) |
Ei muokkausyhteenvetoa |
||
| (39 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 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(); | <!--{$id|default:algalbarochart|escape:'html'}-->_func(); | ||
} | } | ||
| Rivi 22: | Rivi 20: | ||
function <!--{$id|default:algalbarochart|escape:'html'}-->_func() { | function <!--{$id|default:algalbarochart|escape:'html'}-->_func() { | ||
// 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'] }); | ||
| Rivi 32: | Rivi 29: | ||
function <!--{$id|default:algalbarochart|escape:'html'}-->_init() { | function <!--{$id|default:algalbarochart|escape:'html'}-->_init() { | ||
var today = new Date(); | var today = new Date(); | ||
var vuosi = <!--{$vuosi|default:0|escape:'html'}-->; | var vuosi = <!--{$vuosi|default:0|escape:'html'}-->; | ||
| Rivi 305: | 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: { count: '4', 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: i18n( 'Viikko', lang ), slantedText: false, maxAlternation: 1, titleTextStyle: { fontName: ' | |||
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 361: | 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: { count: 4, 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: i18n( 'Viikko', lang ), slantedText: false, maxAlternation: 1, titleTextStyle: { fontName: ' | 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 386: | 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 423: | Rivi 418: | ||
} | } | ||
} | } | ||
jQuery( window ).on( 'resize', doResize ); | |||
} | } | ||
</script> | </script> | ||
</includeonly> | </includeonly> | ||


