HTML in dashboards

It's easy to add HTML content into dashboards via the paragraph text placeholders, for example;

<p style="font-family:arial black;color:#9900FF;font-size:25px;"><b>My text placed here</b></p>   or

<img src="/pictures/shade.jpg" alt="Background">

which work well, but the overall look is restrained due to the fixed format of the 'feedvalue' widget (colour, size, typeface etc).

Is there anyway via HTML in the paragraph text placeholders, that the style of the feedvalue can be changed, by calling the feedvalue from within the HTML, and be able to include style tags, without resorting to editing the system modules or style sheets?

Paul

Mattia Rossi's picture

Re: HTML in dashboards

Hi Paul. You can cheat and use an iframe to include whatever content styled in whatever way you want ... If you include a page external to the emoncms framework you'll have to work a little to access emoncms data though .. Here's an example:

<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="/weather/wugraphs.php" style="width:800px; height:700px;"> </iframe>

Paul Reed's picture

Re: HTML in dashboards

Hi Mattia, thanks for the suggestion but I've made some headway, albeit a bit messy;

<div class="paragraph" style="font-family:verdana;display:inline-block; left: 0;color:#9900FF;font-size:18px;">Today's max temp </div><div class="feedvalue" style="font-family:verdana;display:inline-block;color:#9900FF;font-size:18px;" feedname="Max-temp" units="°C "></div>

I arrived at this by looking at the MySQL dashboard table, which more or less has the above format within.

This is a screen shot, showing the code listed above simply added to a Dashboard>Text>Paragraph field (in the dashboard editor). To try it, paste the code above and change "Max-temp" to "whatever-feedname-you-wish" (add a "-" for a space!)

As you can see, the feedvalue style has changed colour, typeface & size.

Paul

(click image for full screen view)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.