How Can I Link A Css Stylesheet In A Spotfire Analysis?
I can create a Javascript in Spotfire page however I have no idea how to add CSS files. Any suggestion please?
Solution 1:
this is not approved by Spotfire engineering, but you can inject a CSS that is hosted somewhere accessible to the machine running Spotfire (so, your local machine or a web player node) with JQuery:
$('head').append('<link rel="stylesheet" href="path/to/stylesheet.css"type="text/css" />');
so just put that into a JS inside a Text Area and voila!
one thing to note is that the file will be cached, you may want to update the code like:
var t = Date.now();
$('head').append('<link rel="stylesheet" href="style2.css?t=' + t + '" type="text/css" />');
this will append the current timestamp to the URL of the stylesheet ensuring you get a fresh copy every time. it's advised to do this only until you're done modifying the CSS.
Post a Comment for "How Can I Link A Css Stylesheet In A Spotfire Analysis?"