Hello everybody,
I'm wondering if it's possible to set a maximum width for XY Chart tooltips in Perspective.
My problem is that the tooltip contains a Description
string that can sometimes be quite long. When this happens, the tooltip extends off-screen because the text isn't wrapping.
Any advice on how to achieve this would be appreciated!
@Transistor, thanks for the reply.
I guess I explain bad, I need to manage the tooltip in the XY chart series, not in the META.
In ant case I try to add the style object in the tooltip properties, but is not working.
The Tooltips – amCharts 4 Documentation says that tooltips support maxWidth
but it looks like the property is not exposed in Ignition's implementation.
Sorry, I don't know how to force or inject something to fix that.
You could script it. Try this in Script Console.
import textwrap
strs = "Look all around, there's nothing but blue skies - Look straight ahead, there's nothing but blue skies."
print(textwrap.fill(strs, 20))
This will be a bit iffy with proportional width fonts as some words might get shunted onto the next line even though there's enough room.
1 Like
Thanks for your reply, your code in the script console is working good.
This is the print
>>>
Look all around,
there's nothing but
blue skies - Look
straight ahead,
there's nothing but
blue skies.
>>>
I manage my Description
field in the way you suggest and it is working very good, this is a good workaround for the moment.
Thanks a lot for your help