Hi all,
I'd like to modify the appearance of text in table cells by using HTML tags like <b>...</b>
or <br/>
. Unfortunately those tags are rendered textually instead of affecting actual appearance. I tried to debug the problem in the browser by inspecting the elements with F12: I saw that the table is actually a flexbox grid but that is not the cause, I think, for that unwanted rendering behavior.
Any suggestion is appreciated.
Thanks, regards
I'm not sure you can use html in a perspective table. For newline/carriage return type formatting you should be able to use char(10)
.
Carriage return in a perspective cells - Ignition - Inductive Automation Forum
you could use a view rendered cell and then add a markup component to it with whatever you need to add. You will have the row info passed in a params.
Hi @Benjamin_Furlani , that is an option I already went for, but the view rendering gets too heavy - almost 100 cols x 12000 rows, each cell in view render mode.
I tried this Carriage return in a perspective cells - #2 by dkhayes117 too, but it doesn't seem to work, or I'm doing somthing wrong.
What did you try, that didn't work? In a MySQL/MariaDB query, I use it like so
SELECT
concat_ws(CHAR(10 using utf8),column1, column2, column3)
...
with css you can force text to wrap if that is what you want
white-space: pre-wrap;
overflow-wrap: break-word;
did you turn ON virtualized rows? Also what the hell are you displaying if yo need 100 custom colums?
There is no way you would need that many. General layout stuff needs to be done with css.
Please provide a sample screenshot of what your goal is.
Not to derail the point of the topic, but this feels like a pretty large table to display. I am not sure how useful 100 columns are going to be? And do you need this on every column? You can set specific columns to be view rendered and others to not be. Try to consider what data is perinate to the user and then provide a more detailed export possibly?
The number of rows doesn't really matter if you use virtualization or pagination. I use tables with rendered views that have upwards of 40k values depending on the time range and that works fine as long as it is setup to not render every row out of the 40k at the same time.
Just want to make sure you are considering the user experience.
Hi all,
thanks for your help.
Some answers to you:
- virtualization is turned on and pagination too
- columns are ~100 (sometimes even more) and it needs to be like that: it's a final view for quality operators on a huge screen, OK cells are green colored, KO cells are red colored, quality operators need to get an overall idea, rather then deep dive into details.
In that case, you may consider a way to break up your table into multiple tables. Personally, I would recommend a PDF if they have the ability to do report builder, but that is typically what most of my customers prefer due to its exportability.
Hopefully you can use one of the options above.
100 columns, I can see, but 12,000 rows?
I'm pretty sure that no matter how large the screen, 1.2M+ data points is overwhelming for anyone. I know I wouldn't be able to get a very good overall idea when looking at that much data. Your quality operators must be very skilled.
Pagination lets see just 500 rows a time. An option I'm considering is paginating the resultset on the server, rather then letting Ignition paginate the final result.
However the problem of breaking lines in cell is still there.
I believe that the answer to this, is to do it with CSS as @victordcq pointed out, you just need to target the cells.
This solution will wrap text when the right margin is reached and not just when I want, as with an injected <br/>
tag.
If I concat
a char(10)
I get no newline either, nor with a char(10)char(13)
It Just Works , when I do it from a query, but injecting a char(10)
from a transform I had to add the white-space: pre-wrap
too. It does work though.
white-space: pre-wrap;
should handle new lines