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.
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'));
});
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="...
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 ...
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> &...
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....