This addition of quotes did nothing for me. Somehow the d3 does not load 
the url because I get a d3 error that there is no data found.
I can get  json to work with this,

json_data = sj.dumps(pt_data)

then in the view,
var jdata = {{=XML(response.json(pt_data))}}

      g = new Dygraph( document.getElementById("div_pt"),
           jdata,
           {} );

this loads the data with no problems and makes a graph.

BUT, what I want to be able to do is get a pythonic object for each method 
of putting data into d3, as described in the d3 wiki.  Except for json, I 
haven't been yet able to figure this out.

json is a string and so is the pt_data in my code. I need to learn more 
about d3 methods.  I really appreciate all the help with my questions,
and look forward to any incorporation of d3 into web2py.


Margaret

On Tuesday, June 25, 2013 6:02:52 PM UTC-5, Anthony wrote:
>
> I've tried many, many things (I want to get the csv as python solution 
>> working), including this,
>
>       g = new Dygraph( document.getElementById("div_pt"),
>>            d3.csv({{=URL('powertoday','cvstab.csv')}}), 
>>
>
> Your URL needs to be in quotes:
>
> d3.csv("{{=URL('powertoday','cvstab.csv')}}")
>
> which will result in something like:
>
> d3.csv("/yourapp/powertoday/cvstab.csv")
>
> Anthony
>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to