Hello all,
I am using the Collection widget in ThingWorx 9.3.3 to display a group of two mashups with different colors to simulate a percentage bar. I have nine simulated percentage bars like this, each separated by different containers in the main mashup.
On the main mashup, I am executing a service every 30 seconds using Auto Refresh. The data from this service should set the width of the mashups using the "CellWidthField" property in the Collection.
I know that the Auto Refresh is working because I can see the percentage values updating every 30 seconds. However, the width of the mashups does not change accordingly, it only updates when I manually refresh the page. As you can see in the first image, the second percentage bar (which is 100% and red) should fill the entire row like the first one.
The second image shows the correct behavior, but only after a manual page refresh. The width of the mashups in the Collection appears as expected after the page is reloaded.
My question is: How can I use Auto Refresh to update the mashup width in the Collection without having to refresh the entire page?
Solved! Go to Solution.
I found a solution!
I created an expression that triggers the command TW.location.reload() after the auto-reload. This forces a full mashup reload, which causes the collection component to reinitialize properly.
I don't have an answer to your question, but I wonder why you don't use a bar chart or stacked bar chart widget instead of a collection of mashups?
Because I need to complete this task with those specifications, this specific font for the number, and a minimalist visualization. I tried using the standard widgets available in this version, but I couldn't achieve the desired result.
9.3 is out of support for half a year now. Have you tried with a newer version that is in support? Not only the widgets have made progress, so you may be able to do it with the chart widget intended for this visualisation, you might also find this issue not persisting in a newer version.
Hello @GABRYEL25770,
I wanted to follow up with you on your post to see if your question has been answered.
If so, please mark the appropriate reply as the Accepted Solution for the benefit of other members who may have the same question.
Of course, if you have more to share on your issue, please let the Community know so that we can continue to support.
Thanks,
Abhi
Hi, I haven't found a solution yet. I'm currently working on other projects to optimize my time and just waiting for someone who has faced the same problem as me to reply.
I tried on TWX 9.6.1 and it did refresh cell width and height for me on auto refresh.
I was using View "Flow". When using "Table" it always uses the full available width, not considering my cellWidth. But I think this is wanted in this view - not sure.
I am not sure of your exact setup. Maybe you can provide a sample which has the issue. So I could retry in my version? If this is of any help.
Yes, I'm using the Flow visualization. I'll share some pictures of the collection settings and how the data flows into the widget.
Hi @GABRYEL25770,
Thank you for your question.
Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.
Also, feel free to add any additional information you think might be relevant.
configuration seems similar to mine in my test.
I cannot further test than I did already. Would be best if you can provide a sample mashup which has the issue. So I (/the community) could validate it in my TWX and maybe spot an issue.
As it might be the case that there was an issue in your version of TWX with the widget - but to verify the mentioned approach would be good: I try your mashup in my twx to validate if it works there.
Hello @GABRYEL25770,
There's a standard Shape widget, which can be used for displaying progress bars. Configure it like this:
1. Width / height -- to fill your collection cell
2. EnableDynamicFill: YES
3. DynamicFillOrientation: Horizontal
4. Style: Something with a background
Bind your percentage number to its Data property.
/ Constantine
I found a solution!
I created an expression that triggers the command TW.location.reload() after the auto-reload. This forces a full mashup reload, which causes the collection component to reinitialize properly.