If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Custom Tooltips for Charts

Started by Mfg, 04 May 2016 06:45:20 AM

Previous topic - Next topic

Mfg

Hi,

I want to remove '=' sign from tool tips of a bar/Pie/Line chart. is there any way to do that.
For Ex: 'Gross Sales= Gross Sales' but i want 'Gross Sales', which is on category along with 3 more items and i have multiple series items (calculated tuples) which are measure in this case. 

I have tried multiple methods but none of em are working as i mentioned below. At least can i remove '=' sign so that it can work out for me if i hide label or change data item source type to text and leave empty.

Tried following:
Quote
<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>

Quotehttp://www.performanceg2.com/tricks-with-graphs-in-cognos-10/


Thanks in advance.

MFG

MFGF

Quote from: Mfg on 04 May 2016 06:45:20 AM
Hi,

I want to remove '=' sign from tool tips of a bar/Pie/Line chart. is there any way to do that.
For Ex: 'Gross Sales= Gross Sales' but i want 'Gross Sales', which is on category along with 3 more items and i have multiple series items (calculated tuples) which are measure in this case. 

I have tried multiple methods but none of em are working as i mentioned below. At least can i remove '=' sign so that it can work out for me if i hide label or change data item source type to text and leave empty.

Tried following:

Thanks in advance.

Hi,

As far as I'm aware the default tooltips are baked in by IBM. The only report controls you are given are to specify "Absolute, Cumulative or None", but there's nothing I'm aware of in the product simply to remove the = from the tooltip.

QuoteHey MF,

Can i remove '=' sign from chart tool tips....???

Thanks in advance

I don't do JavaScript, sadly, so I can't advise you on whether there's a JavaScript solution to this. I'd advise caution about using JavaScript moving forward, though - when you get to Cognos Analytics and want to use the new Interactive Viewer, you'll find all JavaScript gets ignored.

MF.
Meep!

Mfg

MFG

schrotty

Hi Mfg,

I found this a few days ago (they are using an extra Report Expression)
http://www.performanceg2.com/tricks-with-graphs-in-cognos-10/

Schrotty


Mfg

Thanks for reply MF,

Hey I did go through that link but didn't get desired one, u didn't go through my post completely i think, cuz I've already mentioned that link. :)
MFG