javascript - Protovis Jquery Tooltip problem -


i display data using jquery tooltip in web application.

i have followed example on website http://flowplayer.org/tools/demos/tooltip/index.html , have managed display out tooltip on picture on application.

however, generating bulletchart using protovis , display out data when mouse on over bullet chart.

i want know how edit make tooltip appear? able display using html tags, want display tooltip using javascript code.

below codes bullet chart:

var vis = new pv.panel()             .data(patientdata)             .width(140)             .height(20)             .right(10)             .bottom(20)             .left(5);              var bullet = vis.add(pv.layout.bullet)             .orient("left")             .ranges(function(d) d.ranges)             .measures(function(d) d.measures)             .markers(function(d) d.markers);              bullet.range.add(pv.bar);             bullet.measure.add(pv.bar)             .fillstyle("black")             .text(function(d) "current month: "+ d.tofixed(1)+"%")             .tooltip(); -->this give me error! 

would appreciate inputs. thanks!

the problem here you're trying chain jquery function, .tooltip(), on protovis object, in case pv.bar. that's not going work. couple of options:

  • if you're willing change jquery plugin, follow this example, uses tipsy.

  • you adapt pv.behavior.tipsy code shown here use tooltip() instead. looks pretty easily, editing lines 33 , 64 use different plugin - hard work in code creating div element attach tooltip to, , that's same both plugins.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -