// Numbas version: exam_results_page_options {"name": "Multiple Pie Charts Question 1", "extensions": ["stats", "jsxgraph", "geogebra", "codewords", "polynomials"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {"std": ["all", "fractionNumbers"]}, "statement": "", "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Widget Sales

"}, "parts": [{"marks": 0, "choices": ["

£{answer}     

", "

£{fakeanswer1}        

", "

£{fakeanswer2}        

", "

£{fakeanswer3}          

", "

£{fakeanswer4}         

"], "variableReplacementStrategy": "originalfirst", "maxMarks": 0, "showFeedbackIcon": true, "scripts": {}, "prompt": "
Breakdown of spending in Jennings Inc. (in percent).
\n

\n

If the increase in sales from last year is £{sales} and wages last year were £{wages}, approximately how much is the marketing bill for this year?

", "minMarks": 0, "matrix": ["1", 0, 0, 0, 0], "showCorrectAnswer": true, "type": "1_n_2", "variableReplacements": [], "displayType": "radiogroup", "shuffleChoices": true, "distractors": ["", "", "", "", ""], "displayColumns": 0}], "extensions": ["geogebra", "jsxgraph", "codewords", "polynomials", "stats", "visjs"], "variable_groups": [], "ungrouped_variables": ["yo", "xo", "yo0", "yo1", "yo2", "yo3", "yo4", "yo6", "yo7", "yo8", "yo9", "yo41", "yo5", "yo51", "a", "b", "c", "d", "eee", "f", "answer", "fakeanswer1", "fakeanswer2", "fakeanswer3", "fakeanswer4", "aa", "bb", "cc", "dd", "percent", "students", "yearvector", "ii", "year", "answervector", "increase", "sales", "wages"], "name": "Multiple Pie Charts Question 1", "tags": [], "functions": {}, "advice": "", "preamble": {"css": "", "js": "function dragpoint_board() {\n var scope = question.scope;\n\n var yo0 = scope.variables.yo0.value;\n var yo1 = scope.variables.yo1.value;\n var yo2 = scope.variables.yo2.value;\n var yo3 = scope.variables.yo3.value;\n var yo4 = scope.variables.yo4.value;\n var yo5 = scope.variables.yo5.value;\n var yo6 = scope.variables.yo6.value;\n var yo7 = scope.variables.yo7.value; \n var yo8 = scope.variables.yo8.value;\n var yo9 = scope.variables.yo9.value; \n \n var div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',{boundingBox:[-10.5,10.5,10.5,-10.5], axis:false, grid:false});\n \n $(question.display.html).find('#dragpoint').append(div);\n \n var yo0string = yo0.toString();\n var yo1string = yo1.toString();\n var yo2string = yo2.toString();\n var yo3string = yo3.toString();\n var yo4string = yo4.toString();\n var yo5string = yo5.toString();\n var yo6string = yo6.toString();\n var yo7string = yo7.toString();\n var yo8string = yo8.toString();\n var yo9string = yo9.toString();\n \n var board = div.board;\n \n board.suspendUpdate();\n\n var leg1 = board.create('point',[-0.5,-4.5],{name:'tax',fixed:true,size:6,color:'#0F408D', face:'square', label:{offset:[9,6]}});\n var leg2 = board.create('point',[-0.5,-5.5],{name:'marketing',fixed:true,size:6,color:'#6F1B75', face:'square', label:{offset:[9,6]}});\n var leg3 = board.create('point',[-0.5,-6.5],{name:'wages',fixed:true,size:6,color:'#CA147A', face:'square', label:{offset:[9,6]}});\n var leg4 = board.create('point',[-0.5,-7.5],{name:'sales',fixed:true,size:6,color:'#DA2228', face:'square', label:{offset:[9,6]}});\n \n \n var a = board.create('chart', [[yo0,yo1,yo2,yo3],[10,20,30,40]], {chartStyle:'pie',labels:[yo0string,yo1string,yo2string,yo3string],label: {offset: [-4,-4]},colors:['#0F408D','#6F1B75','#CA147A','#DA2228'], width:1,fillOpacity:1,center:[-5,0],strokeColor:'black',strokeWidth:1, highlightOnSector:true, \n highlightBySize:true});\n var b = board.create('chart', [[1,2,3,4],[yo5,yo6,yo7,yo8]], {chartStyle:'pie',labels:[yo5string,yo6string,yo7string,yo8string],label: {offset: [-4,-4]},colors:['#0F408D','#6F1B75','#CA147A','#DA2228'], width:1,fillOpacity:1,center:[5,0], strokeColor:'black', strokeWidth:1, highlightOnSector:true, \n highlightBySize:true});\n\n \n var txt = board.create('text',[-6.5,7, 'Last Year'], {fontSize:18});\n \n var txt1 = board.create('text',[3.5,7, 'This Year'], {fontSize:18});\n \n}\n\nquestion.signals.on('HTMLAttached',function() {\n dragpoint_board();\n});"}, "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"yo5": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo5", "definition": "random(4..10#1)"}, "yo6": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo6", "definition": "random(4..10#1 except yo5)"}, "yo8": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo8", "definition": "100-yo5-yo6-yo7"}, "bb": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "bb", "definition": "random(0.7..1.3#0.01 except 1 except aa)"}, "yo9": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo9", "definition": "random(41..70#1 except yo5 except yo6 except yo7 except yo8)"}, "yo0": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo0", "definition": "random(4..10#1)"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "d", "definition": "random(1.1..1.3#0.01 except a except b except c)"}, "fakeanswer1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "fakeanswer1", "definition": "precround(aa*answer,2)"}, "increase": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "increase", "definition": "random(10..40#5)"}, "dd": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "dd", "definition": "random(0.7..1.3#0.01 except 1 except aa except bb except cc)"}, "fakeanswer3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "fakeanswer3", "definition": "precround(cc*answer,2)"}, "yo2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo2", "definition": "random(10..20#1)"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "b", "definition": "random(1.1..1.3#0.01 except a)"}, "ii": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ii", "definition": "random(3..6#1)"}, "wages": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "wages", "definition": "random(5000..20000#1000)"}, "yo3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo3", "definition": "100-yo1-yo2-yo0"}, "answer": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "answer", "definition": "precround((wages/yo2*yo3 + sales)/yo8*yo6,2)"}, "sales": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "sales", "definition": "random(15000..40000#1000)"}, "students": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "students", "definition": "random(120..320#1)"}, "percent": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "percent", "definition": "random(5..20#0.1 except 5 except 6 except 7 except 8 except 9 except 10 except 11 except 12 except 13 except 14 except 15 except 16 except 17 except 18 except 19 except 20)"}, "aa": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "aa", "definition": "random(0.7..1.3#0.01 except 1)"}, "yo7": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo7", "definition": "random(10..20#1)"}, "fakeanswer4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "fakeanswer4", "definition": "precround(dd*answer,2)"}, "yearvector": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yearvector", "definition": "vector(2007,2008,2009,2010,2011,2012,2013)"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "a", "definition": "random(1.1..1.3#0.01)"}, "fakeanswer2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "fakeanswer2", "definition": "precround(bb*answer,2)"}, "yo41": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo41", "definition": "d*yo4"}, "xo": {"templateType": "anything", "group": "Ungrouped variables", "description": "

original x values

", "name": "xo", "definition": "list(-2..2)"}, "yo4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo4", "definition": "random(20..40#1 except yo1 except yo0 except yo2 except yo3)"}, "yo1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo1", "definition": "random(4..10#1 except yo0)"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "f", "definition": "random(1.1..1.3#0.01 except a except b except c except d except e)"}, "year": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "year", "definition": "yearvector[ii]"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "c", "definition": "random(1.1..1.3#0.01 except a except b)"}, "answervector": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "answervector", "definition": "vector((yo5-yo0)/yo0*100, (yo6-yo1)/yo1*100,(yo7-yo2)/yo2*100,(yo8-yo3)/yo3*100, (yo9-yo4)/yo4*100)"}, "cc": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "cc", "definition": "random(0.7..1.3#0.01 except 1 except aa except bb)"}, "yo": {"templateType": "anything", "group": "Ungrouped variables", "description": "

the (random) original y values which relate to the x values

", "name": "yo", "definition": "repeat(random(-5..5),5)"}, "eee": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "eee", "definition": "random(1.1..1.3#0.01 except a except b except c except d)"}, "yo51": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "yo51", "definition": "eee*yo5"}}, "type": "question", "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}]}], "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}