Jqplot - Click A Point To Remove It From Database
I have an example of jqplot with working onclick event on the buttons (JqPlot add click event on data points). My goal is this: click on a point to get it's database id. Then I pla
Solution 1:
Got an idea. It is workaround, but works just fine:
var array_with_id_from_database = [1,4,7,9]; //order of id's the same as on graph... obviously
$('#chart').bind('jqplotDataClick',
function (ev, seriesIndex, pointIndex, data) {
alert(array_with_id_from_database[pointIndex]);
//and when you have id you can ajax it from database, reload chart, and so on
}
);
Proud of myself :P
Post a Comment for "Jqplot - Click A Point To Remove It From Database"