Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 61: | Rivi 61: | ||
memo.graphType = jQuery( this ).attr( 'data-graph-type' ); | memo.graphType = jQuery( this ).attr( 'data-graph-type' ); | ||
memo.id = jQuery( this ).attr( 'id' ); if (typeof memo.id == 'undefined') { memo.id = 'jwsitegraph_' + Math.random() + '_container'; jQuery( this ).attr( 'id', memo.id ); } | memo.id = jQuery( this ).attr( 'id' ); if (typeof memo.id == 'undefined') { memo.id = 'jwsitegraph_' + Math.random() + '_container'; jQuery( this ).attr( 'id', memo.id ); } | ||
memo.loadStarts = 0; | memo.loadStarts = 0; | ||
memo.obses = {}; | memo.obses = {}; | ||
| Rivi 88: | Rivi 87: | ||
} | } | ||
} | } | ||
memo.jw.loadObses( { 'obscode': memo. | memo.jw.loadObses( { 'obscode': memo.obscodeParts[0], 'siteid': memo.siteid, 'custom': custom }, function( o ) { | ||
memo.obses = memo.jw.obs; | memo.obses = memo.jw.obs; | ||
drawVisualization(memo); | drawVisualization(memo); | ||
| Rivi 111: | Rivi 110: | ||
//titleTextStyle: { fontSize: 14 }, | //titleTextStyle: { fontSize: 14 }, | ||
backgroundColor: 'transparent', | backgroundColor: 'transparent', | ||
chartArea: { top: memo.margins.top, left: memo.margins.left, width: (memo. | chartArea: { top: memo.margins.top, left: memo.margins.left, width: (memo.widgetEl.width() - memo.margins.left - memo.margins.right), height: (memo.widgetEl.height() - memo.margins.top - memo.margins.bottom), backgroundColor: { fill: '#daf0fa', stroke: '#fff', strokeWidth: 6 }}, | ||
legend: { position: 'bottom' }, | legend: { position: 'bottom' }, | ||
crosshair: { trigger: 'both' }, | crosshair: { trigger: 'both' }, | ||
| Rivi 907: | Rivi 906: | ||
if (!!document.fullscreenElement) { | if (!!document.fullscreenElement) { | ||
//memo.options.chartArea = { top: memo.margins.top, left: memo.margins.left, width: (memo. | //memo.options.chartArea = { top: memo.margins.top, left: memo.margins.left, width: (memo.widgetEl.width() - memo.margins.left - memo.margins.right), height: (memo.widgetEl.height() - memo.margins.top - memo.margins.bottom), backgroundColor: { fill: '#daf0fa', stroke: '#fff', strokeWidth: 6 }}; | ||
if (document.exitFullscreen) { | if (document.exitFullscreen) { | ||
| Rivi 1 071: | Rivi 1 070: | ||
function doResize() { | function doResize() { | ||
var w = memo. | var w = memo.widgetEl.width(); | ||
var l = Math.max( memo.margins.left, 0.1*w ); | var l = Math.max( memo.margins.left, 0.1*w ); | ||
var r = memo.margins.right; | var r = memo.margins.right; | ||
var h = memo. | var h = memo.widgetEl.height(); | ||
var t = Math.max( memo.margins.top, 0.1*h ); | var t = Math.max( memo.margins.top, 0.1*h ); | ||
var b = Math.max( memo.margins.bottom, 0.15*h ); | var b = Math.max( memo.margins.bottom, 0.15*h ); | ||
| Rivi 1 081: | Rivi 1 080: | ||
if (!!document.fullscreenElement) { | if (!!document.fullscreenElement) { | ||
memo.options.chartArea = { top: memo.margins.top*2, left: memo.margins.left*2, width: (memo. | memo.options.chartArea = { top: memo.margins.top*2, left: memo.margins.left*2, width: (memo.widgetEl.width() - memo.margins.left*2 - memo.margins.right - 24), height: (memo.widgetEl.height() - memo.margins.top*2 - memo.margins.bottom*2), backgroundColor: { fill: '#daf0fa', stroke: '#fff', strokeWidth: 6 }}; | ||
} else { | } else { | ||
memo.options.chartArea = { top: memo.margins.top, left: memo.margins.left, width: (memo. | memo.options.chartArea = { top: memo.margins.top, left: memo.margins.left, width: (memo.widgetEl.width() - memo.margins.left - memo.margins.right), height: (memo.widgetEl.height() - memo.margins.top - memo.margins.bottom), backgroundColor: { fill: '#daf0fa', stroke: '#fff', strokeWidth: 6 }}; | ||
} | } | ||
memo.options.chartArea = { top: t, left: l, width: (w - l - r), height: (h - t - b), backgroundColor: { fill: '#daf0fa', stroke: '#fff', strokeWidth: 6 }}; | memo.options.chartArea = { top: t, left: l, width: (w - l - r), height: (h - t - b), backgroundColor: { fill: '#daf0fa', stroke: '#fff', strokeWidth: 6 }}; | ||


