[web2py] Re: anyone tried jQuery svg?
No but I have used processing.js (from the same author as jQuery) and I am very happy with it. On Sunday, 6 January 2013 08:14:13 UTC-6, jonas wrote: > > Hi. > > Has anyone here tried the jQuery svg lib http://keith-wood.name/svg.html? > > I tried to use it in web2py but with no success. > > the necessary lib was imported: src="{{=URL('static','js/jquery/jquery.svg.js')}}"> > but is seems that the svg function is not present : > > svg should be here > > > > $('.test').svg(); > > var svg=$('.test').svg('get'); > svg.circle(130, 75, 50, {fill: 'none', stroke: 'red', strokeWidth: 3}); > > > > the above snippet doesn't work. anyone tried this? > > --
[web2py] Re: anyone tried jQuery svg?
Look at what he does here: http://keith-wood.name/svgBasics.html See the drawInitial function. You need to load it, put it into a document.ready function or something. On Sunday, January 6, 2013 2:14:13 PM UTC, jonas wrote: > > Hi. > > Has anyone here tried the jQuery svg lib http://keith-wood.name/svg.html? > > I tried to use it in web2py but with no success. > > the necessary lib was imported: src="{{=URL('static','js/jquery/jquery.svg.js')}}"> > but is seems that the svg function is not present : > > svg should be here > > > > $('.test').svg(); > > var svg=$('.test').svg('get'); > svg.circle(130, 75, 50, {fill: 'none', stroke: 'red', strokeWidth: 3}); > > > > the above snippet doesn't work. anyone tried this? > > --
[web2py] Re: anyone tried jQuery svg?
I haven't either, but I'd recommend a look at d3js.org, if you want to use svg. I've done something similar to this one, using a web2py generated json data feed - data driven layout ! http://mbostock.github.com/d3/talk/2016/bundle.html On Monday, January 7, 2013 7:29:10 AM UTC+13, villas wrote: > > Look at what he does here: > > http://keith-wood.name/svgBasics.html > > See the drawInitial function. > You need to load it, put it into a document.ready function or something. > > > On Sunday, January 6, 2013 2:14:13 PM UTC, jonas wrote: >> >> Hi. >> >> Has anyone here tried the jQuery svg lib http://keith-wood.name/svg.html >> ? >> >> I tried to use it in web2py but with no success. >> >> the necessary lib was imported: > src="{{=URL('static','js/jquery/jquery.svg.js')}}"> >> but is seems that the svg function is not present : >> >> svg should be here >> >> >> >> $('.test').svg(); >> >> var svg=$('.test').svg('get'); >> svg.circle(130, 75, 50, {fill: 'none', stroke: 'red', strokeWidth: 3}); >> >> >> >> the above snippet doesn't work. anyone tried this? >> >> --
Re: [web2py] Re: anyone tried jQuery svg?
Thanks for the replies. d3js looks very interesting, I will look into that. On Tue, Jan 8, 2013 at 3:56 AM, Andrew W wrote: > I haven't either, but I'd recommend a look at d3js.org, if you want to use > svg. > > I've done something similar to this one, using a web2py generated json data > feed - data driven layout ! > > http://mbostock.github.com/d3/talk/2016/bundle.html > > > > > > > On Monday, January 7, 2013 7:29:10 AM UTC+13, villas wrote: >> >> Look at what he does here: >> >> http://keith-wood.name/svgBasics.html >> >> See the drawInitial function. >> You need to load it, put it into a document.ready function or something. >> >> >> On Sunday, January 6, 2013 2:14:13 PM UTC, jonas wrote: >>> >>> Hi. >>> >>> Has anyone here tried the jQuery svg lib http://keith-wood.name/svg.html? >>> >>> I tried to use it in web2py but with no success. >>> >>> the necessary lib was imported: >> src="{{=URL('static','js/jquery/jquery.svg.js')}}"> >>> but is seems that the svg function is not present : >>> >>> svg should be here >>> >>> >>> >>> $('.test').svg(); >>> >>> var svg=$('.test').svg('get'); >>> svg.circle(130, 75, 50, {fill: 'none', stroke: 'red', strokeWidth: 3}); >>> >>> >>> >>> the above snippet doesn't work. anyone tried this? >>> > -- > > > --