yes, thanks, that is what I have been doing, and the web error console
shows when d3 can't read the string. I didn't compile a list of the errors,
but I intend to keep trying with the csv inputs and will post something
when it works. Thanks for all your help.
margaret
On Wednesday, June 26, 2013 3:07:06 PM UTC-5, Anthony wrote:
>
> In your browser developer tools, can you watch the ajax request and see
> what web2py is returning?
>
> On Wednesday, June 26, 2013 4:03:47 PM UTC-4, greaneym wrote:
>>
>> 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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.