title: how to create chart by selecting from dropdown and date picker
body: <p>Another starter question...</p>
  
  <p>I have to create a chart (bar, line etc) by selecting an attribute from the dropdown listbox and date picker. Attribute's value from dropdown goes to y axis and date to x axis. The attributes in the dropdown is coming from an json output (URL - currently <a href="http://localhost:8080/someproject" rel="nofollow">http://localhost:8080/someproject</a>)</p>
  
  <p>I am looking something like in the link <a href="http://bl.ocks.org/mbostock/3885304" rel="nofollow">Bar chart D3 libraries</a>.</p>
  
  <p>I am able to get the x axis but i am struggling to put values on the y axis...</p>
  
  <p>Here is the <a href="http://jsfiddle.net/jxd5s01q/2/" rel="nofollow">Fiddle</a></p>
  
  <pre><code>var selection = $('#dropdown1 :selected').text();
  console.log("as".selection);
  $.each(jsObject, function(index, value) {
                  console.log("%o",value)
                  if (value['name'] == selection) {
                      var optionHtml = '';
                      for (var i = 1; i &lt;= 20; i++) {
                          var attr = 'attr' + ('000' + i).substr(-3);
                          var val = 'val' + ('000' + i).substr(-3);
                          optionHtml += '&lt;option value="' + attr + '" data-val="'+value[val]+'"&gt;' + value[attr] + '&lt;/option&gt;';
                      }
                      $("#listbox").css("width", "500px")
                      $("#listbox").css("height", "300px")
                      $('#listbox').append(optionHtml);
                      return false;
                  }
                  var selectedOption = $(this).find('option:selected');
                  console.log(selectedOption);
  });
  </code></pre>
  
  <p>Please ignore the data as of now, as the dropdown is getting populate correctly on my local desktop. </p>
  
  <p>I am just looking for <strong>the logic of putting the values of my attribute selected in the drop down list box on the y axis for the required date selected in the date picker.</strong></p>
  
  <p>Apologies for not adding more code, due to company policy...</p>