1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Pie graph inside tooltip

Discussion in 'JavaScript' started by nucaj, Mar 4, 2009.

  1. #1
    Hello:)
    I’m trying to find a way to include a 'pie' graph in a tooltip, but it's without any success.

    Here, below, an example using:
    Jquery Sparklines
    Tooltip JavaScript Library (walterzorn.com)
    without any luck.

    Any suggestions welcome:)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    	<script src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js"></script>
    	<script src="http://omnipotent.net/jquery.sparkline/1.1/jquery.sparkline.min.js"></script>
    </head>
    	<body>
    		<script src="http://www.mitcio.com/js/wz_tooltip/wz_tooltip.js"></script>
    		
    		<script type="text/javascript">
    			$(document).ready(function() {
    				$('.pie').sparkline('html', { type: 'pie', height: '20px' });
    			});
    			foo='<span class=&quot;pie&quot;>80,20</span>'
    		</script>
    
    		<span class='pie'>80,20</span>
    
    		<a href="" 
    			onmouseover="Tip('Pie: ' + foo)" 
    			onmouseout="UnTip()">Test
    		</a>
    		
    	
    	</body>
    </html>
    Code (markup):
     
    nucaj, Mar 4, 2009 IP
  2. Joak1m

    Joak1m Peon

    Messages:
    135
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you use jQuery, you should use jQuery UI library as well - queryui.com
     
    Joak1m, Mar 4, 2009 IP