Monday, 15 August 2011

Convert SVG Rect x,y to screen left and top jQuery SVG -



Convert SVG Rect x,y to screen left and top jQuery SVG -

i using google visualization generate column chart, spice display want alter annotation using custom text , image, need exact top , left position of each annotation

currently applying random values after series of trial , error create layout close looking for

i know whether possible convert x,y values of annotation screen left , top values, way able desired layout.

please see link http://www.screencast.com/t/f0ytn2m0is

the little orange icons values 230 etc ones should in line line graph

you can check reply "how can absolutely orient text in svg". can create jquery plugin using code answer.

$.fn.getrealbbox = function() { if (this[0] instanceof svgelement) { homecoming getboundingboxinarbitraryspace(this[0], this[0].getctm()); } else { throw "selector '" + this.selector + "' not svgelement"; } };

and utilize x , y, can set object top left values, if want html object in middle add together box.width/2 , box.height/2.

jquery svg position google-visualization

No comments:

Post a Comment