Skip to content

Instantly share code, notes, and snippets.

@mindspank
Created May 22, 2015 16:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mindspank/33b70f7ecb8f21257257 to your computer and use it in GitHub Desktop.
Save mindspank/33b70f7ecb8f21257257 to your computer and use it in GitHub Desktop.
QV Workbench
/* 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