Active
Project:
Flot
Version:
7.x-1.0
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2013 at 10:20 UTC
Updated:
29 Dec 2014 at 12:39 UTC
Jump to comment: Most recent
How come the div containing the Flot graph returns empty on an ajax callback from my form. I attach an ajax callback on my radio elements to retrieve a new set of data depending on the radio chosen.
Comments
Comment #1
Bimble commentedI have the same problem, did you find a solution?
Comment #2
etroid commentedThis is an old issue, but I thought I'd give my two cents after encountering this issue myself. By default the javascript to plot the chart does not get run on ajax callback. In order to achieve this you have to write some custom code. I ended up writing my own custom flot chart function which is using "Drupal.behaviors" and runs on ajax callbacks as well. The code below requires some modifications of the flot module, but it should give you an idea of how to go about it. You are always welcome to pm for more information.
Hope this will help someone out in the future!
The JS code:
--------------
Php code
----------