Hi, We would like to know if we can change the tooltip of a chart dynamically by using parameters.
Thanks.
Hi,
I have used the following script to chage the default tool tips for charts.
<script>
areas = document.getElementsByTagName('area');
var stop = 0;
var toMatch = new RegExp('Product line = " + [Query1].[Product line] + "');
toMatch = toMatch.toString();
toMatch = toMatch.substring(1,toMatch.length -1);
for(i in areas) {
if(areas.className='dl chart_area') {
if(areas.title ){
var title = areas.title;
if( title.indexOf(toMatch) == 0 && title.indexOf('Revenue = ') > -1){
areas.title = '" + [Query1].[Product line] + " - Quantity - " + number2string([Query1].[Quantity]) + "';
//alert( 'Changed ' + areas.title ' To ' + areas.title );
}
}
}
}
</script>
HTH