[ "Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin" ] randRange( 0, HOUSES.length - 1 ) shuffle( [ 1, 2, 3, 4, 5 ], 4 ) (function() { var ordinals = $.map( HOUSES, function( house, i ) { return house.charAt( 0 ); }); return { min: 0, max: 5, tickCount: 5, values: VALUES, ordinals: ordinals }; })()

At Hogwarts, there are four houses: toSentence( HOUSES ). The bar chart below shows the number of house points that each house received today.

How many house points did HOUSES[ INDEX ] receive?

var width = 5; var height = 5; init({ range: [ [ -1, width + 1 ], [ -1, height + 0.5 ] ] }); var pos = { lx: 0, ly: 0, width: width, height: height}; graph.barchart = new BarChart( DATA, pos ); graph.barchart.draw();
VALUES[ INDEX ] house points

Find the bar for HOUSES[ INDEX ] by looking at the letter under each bar.

graph.barchart.highlightDataPoint( INDEX );

Compare how tall the bar is with the numbers to the left.

graph.barchart.labelDataPoint( INDEX );

HOUSES[ INDEX ] received plural( VALUES[ INDEX ], "house point" ).