Created
May 22, 2015 16:57
-
-
Save mindspank/33b70f7ecb8f21257257 to your computer and use it in GitHub Desktop.
QV Workbench
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Workbench */ | |
Qv.InitWorkBench({ | |
View: 'FirstVersion', | |
Host: null, | |
Anonymous: true, | |
BodyOnLoadFunctionNames: ['init'], | |
InitialSelections: ['LB137,Moderaterna'] | |
}); | |
function init() { | |
$doc = Qv.GetCurrentDocument(); | |
$doc.GetObject('CH35', function() { | |
$('.heading').height(65) | |
this.Data.SetPagesizeY(this.Data.TotalSize.y) | |
$.each(this.Data.Rows, function(i, val) { | |
if ($.inArray(val[1].text, clabels) === -1) clabels.push(val[1].text); | |
}); | |
$.each(this.Data.Rows, function(i, val) { | |
if ($.inArray(val[0].text, rlabels) === -1) rlabels.push(val[0].text); | |
}); | |
$.each(this.Data.Rows, function(index, val) { | |
data.push({ | |
clabel: val[1].text, | |
rlabel: val[0].text, | |
value: parseFloat(val[2].text), | |
party: val[4].text | |
}) | |
}); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment