How to do line breaks in a text label in Perspective?
I try to replace “\n” by “< b>”(without space) in a script transform but it didn’t work, the is showing and doesn’t create a line break. I try Markdown component too but I have the same issue, I can’t have line break.
can you correct me what i am doing wrong in this script
if len(tag_check_neagtive) > 0:
i = 0
confirm = False
negative_message = 'This chart is unavailable for string type data. Please unselect the tags listed below from the Tag Tree Browser.'
for y in tag_check_neagtive:
negative_message += '<br>' + str(tag_check_neagtive[i])
i += 1
system.perspective.openPopup("Warning", "test",
{"message": negative_message}, "Error",
modal=True, showCloseIcon=True, draggable=False, resizable=False)
output i am getting
This chart is unavailable for string type data. Please unselect the tags listed below from the Tag Tree Browser. [MQTT Engine]Edge Nodes//Electricity/Valid From
but i want output
This chart is unavailable for string type data. Please unselect the tags listed below from the Tag Tree Browser.
[MQTT Engine]Edge Nodes//Electricity/Valid From
sorry i am getting output like this without line break
This chart is unavailable for string type data. Please unselect the tags listed below from the Tag Tree Browser.[MQTT Engine]Edge Nodes//Electricity/Valid From
but i want
This chart is unavailable for string type data. Please unselect the tags listed below from the Tag Tree Browser - single line
and
tag in another line
[MQTT Engine]Edge Nodes//Electricity/Valid From
final output there should be break inbetween
This chart is unavailable for string type data. Please unselect the tags listed below from the Tag Tree Browser
[MQTT Engine]Edge Nodes//Electricity/Valid From
You can use the <pre> tag as @transistor shows but that changes the formatting, which means you might need to provide additional styling.
What is the actual type held in the tag_check_negative list. I see you're converting it to a string, does that mean its actually a list of TagPath objects? How are you obtaining the list?