views:

281

answers:

2

Hello, I have pcharts on my website. I want to add some javascript function for client side facility. If any user mouseover on graph,it shows values on tooltip. Is it possible? Can anybody know how can i do this? Please help me.

A: 

You can use the "title" attribute of HTML

<a id="tooltipsample" href="linktarget" title="Tooltip">Sample Link</a>

or set it in javascript

<script type="text/javascript">
document.getElementById(tooltipsample).title="New Tooltip";
</script>

<a id="tooltipsample" href="linktarget" title="Tooltip">Sample Link</a>

or with jquery

$('a#tooltipsample').attr('title', 'New Tooltip');
Cadoc
+1  A: 

pChart supports this functionality out of the box. See here: http://pchart.sunyday.net/ImageMap/

Klas