[Solved] HTML entities not working in certain block labels

#1

HTML entities work fine in the graph block labels but not in the gauge block labels. Haven’t checked the other blocks.

0 Likes

#2

Interesting. I think you’re the first I’ve seen that has tried to use HTML in the labels. Which direction would you like? Do you want HTML rendered or escaped?

0 Likes

#3

Not entirely sure what would be best for others, but I think the general expectation is that an HTML entity code should be rendered as the symbol.

In my case I’m using it to indicate degrees (°) / ( & deg ; ) on the dashboard. Since a temp sensor is included in the builder kit, I think others would be trying to use it too. I’m a little surprised I’m the only one!

While we’re on this label topic, is there a reason the Label doesn’t replace the vertical variable name on the Y axis? Can this be changed or a tick box option to replace it with the Label name added?

0 Likes

#4

Ah, I understand now. I always used the unicode character for the degree symbol (option-k on mac). That’s what this dashboard uses: https://app.losant.com/#/dashboards/56ca3f3ee258b101006a20e5

I could totally see people using the entity code also.

0 Likes

#5

Hi Brent, great catch! We’ve made the following updates based on your recommendation:

  • Labels in the dial gauge will convert HTML entities to the proper character
  • (Bonus!) Dial gauge labels will also accept Markdown
  • (Double Bonus!) Both of the above changes will also be applied to the dashboard block title

These changes will be released in the next few days along with some other features.

And before you ask, labels in the pie chart, bar chart and line chart widgets already convert HTML entities, but we have not yet implemented Markdown support into those fields.

Keep the recommendations coming!

0 Likes

#6

@Brent_Crawford the changes described in my last post have just been released. We’ll update the documentation shortly, but for now, you can start using HTML entities and Markdown in the dial gauge label, as well as Markdown in block titles.

0 Likes

#7

Thanks Dylan, have a great weekend!

0 Likes