title: Rails reload chartkick based on form input
body: <p>I'm using <code>chartkick</code> in a rails 4 app. I currently run this code:</p>
  
  <p><code>&lt;%= bar_chart groupArticles(metric, limit) %&gt;</code> (<code>groupArticles()</code> being a custom method to get an array into chartkick. For example <code>&lt;%= bar_chart groupArticles("views", 5)%&gt;</code> gives me the top five articles by the <code>views</code> metric.</p>
  
  <p>Now the question is this: I want to have a little form where the user can for select a different metric or limit to be passed in (i.e. change it to top 3 or from <code>views</code> to <code>date</code> or w/e).</p>
  
  <p>I want to reload the chart then (I have URL params to get other stuff on the page so I can't use new url params to achieve this (i think?).</p>
  
  <p>The reason behind that is that I have a table where I use url params to sort it by on the same page. I don't want the user to loose this current sorting if he changes the graph.</p>
  
  <p>Is this possible? How do I build that form?</p>