title: Create Customize legend for flot chart and get access to items after generation
body: <p>I have a graph using <strong>$.plot</strong> to created. I'm trying to use option values like 'series.percent' of chart for each data item. the reason behind that is I want to create a customized legend based on graph data.(for exp:show percentage in labelBox). Is it possible to do that?
  I 've tried to use Plothover event and then trigger it for all data s . but I cant find any code for triggering that. 
  this is the code for hovering:</p>
  
  <pre><code>   $(this).bind("plothover", function (event, pos, item) {
                  console.log(event + pos + item);
                  if (!item) { return; }
                  console.log(item.series.data)
                  var html = [];
                  var percent = parseFloat(item.series.percent).toFixed(2);
  
                  str = item.series.label.replace(/\s/g, '');
                  var legendSection = create('&lt;div id=' + str + ' class="col-md-6 cls" style="margin-top: 5px;"&gt;' +
                    '&lt;span class="col-md-4 cls" style="padding-left: 1px; padding-right: 1px; display: inline-block; height: 20px; color: white; background-color: ' + item.series.color + '"&gt;' + percent + '&lt;/span&gt;' +
                    '&lt;div class="col-md-8 cls"&gt;' + '&lt;div class="row cls clsR"&gt;' +
                    '&lt;span class="col-md-8 cls" style="background-color: white; color: black; font-size: 11px;"&gt;' + item.series.label + '&lt;/span&gt;' +
                    '&lt;span class="col-md-8 cls" style="background-color: white; color: black; font-size: 11px;"&gt;' + item.series.data + '&lt;/span&gt;' +
                    '&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;');
                  if ($("#container").find('#' + str + '').length == 0)
                      $("#container").append(legendSection);
              });
  </code></pre>
  
  <p>my questions are :
  1)how can I get access to percent and items of chart?
  2)how can I know if there's any other <strong>event</strong> that can be bound for plot chart?
  3)Or is there any way to customizing legend as I mentioned for labelBox?</p>
  
  <p>thanks for any help</p>