Formatting Text using Table Widget



  • Avatar
    Delsaran Bigglesworth

    Is that all the code you are using in the script editor? Because this is what I get when I use that code. Are you using the "customStyle" plugin as well. This might be over writing the script css after the fact.

    I see this little green boxes around. You should probably specify which "th"s and "tb"s you want to change or it will change all of them on the page.

    const widgetElement = prism.$ngscope.appstate === 'dashboard' ? $('widget[widgetid="<<THAT WIDGETS ID>>"]') : undefined;

    I think you could use this instead of Element?


    Comment actions Permalink
  • Avatar
    John Ami

    Hi Delsaran,

    I appreciate your help in looking in to this thread.

    I am using a web version of SiSense.

     So basically, I am using the script on widget level so it does not affect other widgets even if I use td or th.


    I'll be needing it to format in this way, only on the specific widget.

    Comment actions Permalink
  • Avatar
    Delsaran Bigglesworth

    Hi Kahel,

    I think the tag you're looking for in "thead".

    widget.on('ready', function(sender, ev){

    var $ps1 = $("th", element);
    $ps1.css('font-size' , '14px');
    $ps1.css('font-weight' , 'bolder');
    $ps1.css('color' , 'white');

    $("thead", element).css('background-color' , '#49166d');

    $ps1.css('text-align' , 'center');
    $ps1.css('vertical-align' , 'middle');

    var $ps2= $("td", element);
    $ps2.css('font-size' , '24px');
    $ps2.css('font-weight' , 'bolder');
    $ps2.css('color' , '#4B286D');


    As for the refresh, what pop up comes up?

    Comment actions Permalink

Please sign in to leave a comment.