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?![]()
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?![]()
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
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});
}
);
}
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});
}
);
}
)
}
}
}
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.