title: ggvis - Interactive X axis for bar chart
body: <p>I'm looking into building a shiny app with ggvis.
  For this I'm using a small dataset called "company". It contains employee data where each line represents and employee.</p>
  
  <p>From a ggvis perspective I'm trying the following:
  Creating a bar chart that shows distribution for the following variables:</p>
  
  <ul>
  <li>Age</li>
  <li>Role</li>
  <li>Sex</li>
  </ul>
  
  <p>Instead of creating three different bar charts by using the following code:</p>
  
  <pre><code>#Barcharts - Role
  company %&gt;% ggvis(~Role,opacity := 0.8, fill:= "firebrick") %&gt;%
    layer_bars() %&gt;%
    scale_ordinal('x', domain=c('Analyst','Consultant','Software Engineer','Manager','Director'))
  
  #Barcharts - Age
  company %&gt;% ggvis(~Age,opacity := 0.8, fill:= "firebrick") %&gt;%
    layer_bars()
  
  #Barcharts - Sex
  company %&gt;% ggvis(~Sex,opacity := 0.8, fill:= "firebrick") %&gt;%    
    layer_bars()
  </code></pre>
  
  <p>I'd like to create a ggvis bar chart that allows an input selector.</p>
  
  <p>I've tried the following code:</p>
  
  <pre><code>company %&gt;% ggvis(input_select(c("Sex","Role","Age"), map = as.name)) %&gt;% layer_bars()
  </code></pre>
  
  <p>The following error is returned:</p>
  
  <pre><code>Error: Visual property x.update is not a variable
  </code></pre>
  
  <p>The data used would be:</p>
  
  <pre><code>raw &lt;- "Age Sex Role
  35   M          Director
  37   M          Director
  30   M           Manager
  28   M           Manager
  28   F           Manager
  27   M Software_Engineer
  25   M        Consultant
  26   M        Consultant
  25   F           Analyst
  25   M           Analyst
  25   M           Analyst
  25   M           Analyst
  25   M           Analyst
  25   M           Analyst
  25   F           Analyst
  25   F           Analyst
  25   F           Analyst
  24   F           Analyst
  25   M           Analyst"
  
  
  company = read.table(textConnection(raw), header=TRUE)
  </code></pre>
  
  <p>This makes me believe that ggvis does not allow the x variable to be an input selector item. Is this correct? Is there a solution for this?</p>
  
  <p>Thank you in advance.
  Kind regards</p>