US and Worldwide: +1 (866) 660-7555
Results 1 to 6 of 6

Thread: tooltips for table components?

  1. #1

    Default tooltips for table components?

    I cant find anywhere to configure tooltips for hovering over table components in cde. Ccc bar chart works by default but is there a way to have the same functionality hovering over components in a table?

  2. #2

    Default


  3. #3
    Join Date
    Jul 2007
    Posts
    2,172

    Default

    You can write a simple addin for your column and then use the tipsy jquery plugin (already in cdf, you just need to call it)
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  4. #4

    Default

    I got curious with that one... I dont know if by addin u mean this... but... I manage to do it with "post execution" and the code:

    function myTip() /* Where "htbTable" is the table id */
    {
    var myTitle = function () {return $(this).html(); };

    $('#htbTable tr td').each(
    function(){
    $(this).tipsy({title: myTitle});
    }
    );
    }

  5. #5

    Default

    Hmm interesting and thanks for the tips. I'm learning javascript so I'm not sure where I'm going wrong. The above code works for all columns so I added 2 lines to the code to try and get it to only show tooltips for the first column but now my table doesn't render. So I'm doing something wrong.. if I can get that working I need to work out how to make the tooltip show data from a different column when hovering over the first column

    function myTip() /* Where "htbTable" is the table id */
    {
    var myTitle = function () {return $(this).html(); };

    this.setAddInOptions("colType","string",function(state){
    if(state.colIdx == "0"){return{

    $('#colTable tr td').each(
    function(){
    $(this).tipsy({title: myTitle});
    }
    );
    }
    )
    }
    }
    }

  6. #6

    Default

    Hi,

    I dont get what u are trying to accomplish... but changing the selector to target just the first col.. could go like:

    "$('#colTable tr td:first-child')...." instead $('#colTable tr td').each(

    To get different data u just have to work with the :

    "var myTitle = function () {
    ..."

    And get the data u whant... there is several ways...

    PS: No need for the:
    "this.setAddInOptions("colType","string",function(state){
    if(state.colIdx == "0"){return{"
    Last edited by dguiarj; 07-06-2012 at 01:52 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •