JavaScript hiding individual slices of a flot pie chart based on corresponding names

I ve drawn a pie chart graph using pie chart flot library.. I ve my own custom legend box. So I was trying to know if it is possible to hide the a particular slice based on user input. Like here Ive added a similar example for jsfiddle.

Here at the bottom of chart Ive made a legend box and added hover function using jquery. so what I am trying to when I hover over those legends.. the corresponding slices should get hidden.

http://jsfiddle.net/mHJm5/18/

var data = [
   {
label: "Serie1",
data: 10,
url: "http://stackoverflow.com"},
{
label: "Serie2",
data: 30,
url: "http://serverfault.com"},
{
label: "Serie3",
data: 90,
url: "http://superuser.com"},
{
 label: "Serie4",
data: 70,
url: "http://www.google.com"},
{
label: "Serie5",
data: 80,
url: "http://www.oprah.com"},
{
 label: "Serie6",
 data: 110,
 url: "http://www.realultimatepower.net/"}
  ];

var options = {
   series: { pie: { show: true, label: false, } },
   grid: { clickable: true},
   legend: {
            show: false
        }

 };

  var testHTML = '';
  for(var k=0; k<data.length; k++){
    testHTML += "<span class = 'hoverableSpace' id='"+ data[k].label+"'>"+  data[k].label +"</span>";
  }

$(".mapper").html(testHTML);

var plot = $.plot($("#graphLoaderDiv"), data, options);


$(".hoverableSpace").on("mouseover", function(){
   alert($(this).attr('id'));
});
Answer:1

I am new in Javascript and I am trying to test following code <html> <head> <script src="jquery/jquery.min.js"> </head> <body> <input type="button" value="...

I am new in Javascript and I am trying to test following code <html> <head> <script src="jquery/jquery.min.js"> </head> <body> <input type="button" value="...

  1. element does not exist in cache
  2. element does not have an alt attribute
  3. element does not contain neutrons
  4. element does not follow octet rule
  5. element does not show allotropy
  6. element does not exist in mfs
  7. element does not exist in dom
  8. element does not show catenation
  9. element does not have a match in class
  10. element does not define a default property
  11. element does not exhibit allotropy
  12. element does not exist cypress
  13. element does not exist in selenium
  14. element doesn't have required attribute
  15. element doesn't exist in dom
  16. element doesn't float
  17. element doesn't exist on the window
  18. what element does not contain neutrons
  19. element doesn't have id
  20. element doesnt work

I have a string that I'd like to pull some content from using javascript. The string can have multiple forms as follows: [[(a*, b*) within 20]] or [[...(a*, b*) within 20]] where the "..." may or may ...

I have a string that I'd like to pull some content from using javascript. The string can have multiple forms as follows: [[(a*, b*) within 20]] or [[...(a*, b*) within 20]] where the "..." may or may ...

  1. combine match regex
  2. c# combine regex matches

I'm making a chrome extension, and so far I'm just testing some things. The HTML for the extension is this: <!doctype html> <html> <head> <title>Title</title> &...

I'm making a chrome extension, and so far I'm just testing some things. The HTML for the extension is this: <!doctype html> <html> <head> <title>Title</title> &...

  1. html form submit button
  2. html form submit javascript
  3. html form submit post
  4. html form submit on enter
  5. html form submit action
  6. html form submit to email
  7. html form submit without redirect
  8. html form submit json
  9. html form submit without refresh
  10. html form submit event
  11. html form submit redirect
  12. html form submit with header
  13. html form submit prevent default
  14. html form submit to same page
  15. html form submit not working
  16. html form submit button text
  17. html form submit button value
  18. html form submit without button
  19. html form submit new tab
  20. html form submit button outside form

I have been having some trouble in creating a simple notification box. Basically the objective here when I click the submit button input type=button it will display a simple notification box like this....

I have been having some trouble in creating a simple notification box. Basically the objective here when I click the submit button input type=button it will display a simple notification box like this....