Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 1 544: | Rivi 1 544: | ||
var b = Math.max( memo.margins.bottom, 0.15*h ); | var b = Math.max( memo.margins.bottom, 0.15*h ); | ||
memo.options.chartArea = { top: t, left: l, width: (w - l - r), height: (h - t - b), backgroundColor: { fill: '#fff', stroke: '#eee', strokeWidth: 4 }} | memo.options.chartArea = { top: t, left: l, width: (w - l - r), height: (h - t - b), backgroundColor: { fill: '#fff', stroke: '#eee', strokeWidth: 4 }}; | ||
for ( var o in memo.data.Wf ) { | for ( var o in memo.data.Wf ) { | ||
for ( var i in memo.data.Wf[ o ].c ) { | for ( var i in memo.data.Wf[ o ].c ) { | ||
| Rivi 1 557: | Rivi 1 556: | ||
orgsize = parseInt( v.match( /original-size: .+;/g )[0].replace( 'original-size: ', '' ).replace( ';', '') ); | orgsize = parseInt( v.match( /original-size: .+;/g )[0].replace( 'original-size: ', '' ).replace( ';', '') ); | ||
newsize = Math.round( (w/500) * orgsize ); | newsize = Math.round( (w/500) * orgsize ); | ||
newsize = Math.round( Math.SQRT( (w/500) / Math.PI ) * orgsize ); | |||
if ( w > 500 ) { | if ( w > 500 ) { | ||
v = v.replace( ' size: ' + oldsize, ' size: ' + newsize ); | v = v.replace( ' size: ' + oldsize, ' size: ' + newsize ); | ||
} else { | } else { | ||
v = v.replace( ' size: ' + oldsize, ' size: ' + orgsize ); | v = v.replace( ' size: ' + oldsize, ' size: ' + orgsize ); | ||
} | } | ||
memo.data.Wf[ o ].c[ i ].v = v; | memo.data.Wf[ o ].c[ i ].v = v; | ||
break; | break; | ||


