CategoryPicker as column selector

This fiddle uses a Google Visualization API CategoryPicker control to change the columns in a Visualization API chart.

HTML

<script src="http://www.google.com/jsapi?fake=.js"></script>
<div id="dashboard">
    <table>
        <tr style='vertical-align: top'>
            <td style='width: 250px; height: 75px; font-size: 0.9em;'>
                <div id="control2"></div>
                <div id="control3"></div>
                <div style="float: top;" id="chart1"></div>
            </td>
        </tr>
    </table>
</div>

JavaScript

google.load('visualization', '1.1', {packages: ['controls']});
google.setOnLoadCallback(drawVisualization);

function drawVisualization() {
    // Prepare the data
    var data = new google.visualization.DataTable();
    data.addColumn('string', 'Direction');
    data.addColumn('string', 'Residence');
    data.addColumn('string', 'Workplace');
    data.addColumn('number', 'Proportion');
    data.addColumn({type: 'number', role: 'interval'});
    data.addColumn({type: 'number', role: 'interval'});
    // added 'outward' for London and 'inward' for Wyre Forest to make filters work better
    data.addRows([
        ['Outward', 'City of London', 'Tower Hamlets', 9.35, 8.2, 9.55],
        ['Outward', 'City of London', 'Newham', 6.63, 5.6, 7.63],
        ['Outward', 'City of London', 'Wandsworth', 7.6, 5.4, 7.84],
        ['Outward', 'City of London', 'Redbridge', 6.48, 4.5, 8.41],
        ['Outward', 'City of London', 'Waltham Forest', 5.15, 4.3, 6.02],
        ['Outward', 'City of London', 'Southwark', 4.65, 4.6, 5.73],
        ['Outward', 'City of London', 'Westminster', 5.55, 3.4, 5.71],
        ['Inward', 'City of London', 'Tower Hamlets', 7.35, 6.2, 8.55],
        ['Inward', 'City of London', 'Newham', 5.63, 4.6, 6.63],
        ['Inward', 'City of London', 'Wandsworth', 4.6, 3.4, 5.84],
        ['Inward', 'City of London', 'Redbridge', 4.48, 3.5, 5.41],
        ['Inward', 'City of London', 'Waltham Forest', 4.15, 3.3, 5.02],
        ['Inward', 'City of London', 'Southwark', 3.65, 2.6, 4.73],
        ['Inward', 'City of London', 'Westminster', 3.55, 2.4, 4.71],
        ['Outward', 'Wyre Forest', 'Shropshire', 10.34, 0, 12.67],
        ['Outward', 'Wyre Forest', 'Wolverhampton', 3.84, 0, 4.49],
        ['Outward', 'Wyre Forest', 'Tamworth', 1.83, 0, 4.44],
        ['Outward', 'Wyre Forest', 'Herefordshire, County of', 1.48, 0, 3.3],
        ['Outward', 'Wyre Forest', 'Warwick', 0.78, 0, 1.3],
        ['Outward', 'Wyre Forest', 'East Staffordshire', 0.7, 0, 1.4],
  ...