wildanSawaludin / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Flot not working when called from inside an ajax (Only when used in wordpress) #751

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Im using a flot chart on my page to graph data.

The calcs are done in a php file, returned to my page using ajax and then the 
data is passed to a function that graphs the results using flot.

If I do this on my webpage being hosted by wamp, it works perfectly.

When I put this into wordpress flot stops working.

If I use flot outside the ajax call, flot works perfectly, it just stops 
working when its inside the ajax call.

Original issue reported on code.google.com by paul.gan...@gmail.com on 10 Sep 2012 at 11:41

GoogleCodeExporter commented 9 years ago
example:

      function send_php()
      {
      jQuery.post("/calcs.php", {AllData: container.handsontable('getData')},
      function(data) {

        var All_Data = eval('(' + data + ')');

        populate_table(All_Data)

        populate_graph()

        });

    }

In that example, populate_graph() is the function with the flot code, here it 
does not work. If I put populate_graph() outside this jQuery.post it does work. 

Original comment by paul.gan...@gmail.com on 10 Sep 2012 at 12:31

GoogleCodeExporter commented 9 years ago
If it works in one place, then it's really not a Flot bug.  Please take a look 
at the forums at https://groups.google.com/forum/?fromgroups#!forum/flot-graphs.

Original comment by dnsch...@gmail.com on 13 Sep 2012 at 3:46