I am currently trying to build up a new dashboard for one of our customers.
Therefore I was trying to implement a new doughnut chart that should show the overall amount of managed clients in the middle of the doughnut and the different OS shown in the doughnut.
In chartJS I found that centertext is possible but unfortunately I couldn’t manage to add this code correctly to show this in the UD built dashboard. Is there anybody able to show me how this can be managed.
Currently in the examlpe code there are 2 Charts.
The first one is the doughnut chart that show basically everything as wanted. In the second one I tried to add the option. Unfirtunately in the second the labels also vanished
The Module Version used is
2.5.2 Universaldashboard
PSVersion 5.1.14393.2515
Examplecode is shown below:
indent preformatted text by 4 spaces
Hi,
Thanks for your quick reply! Meanwhile I found the UD Javascript CMD let on my own. As well as the documentation. Unfortunately my skillset isn‘t that good neither.
So is anyone in the community able to show how it would be possible to add the wanted feature with additional JS code, and wants to share his knowledge😉?
I think this might be possibly highly appreciated also from other users of doughnut charts!
Hi again,
is there nobody who is able to clarify how to add the Java code to add Text to a doghnut charts center with a UD Java Script element, and furthermore how to use it afterwards ;-)?
I tried already with the how tos Online and in the documentation which were a little bit too limited.
Hey @psDevUK thank very much! Thats exactly what I am looking for.
I already tried to change existing js files or to add a new one that could manage this.
Unfortunately I am well in Powershell coding but my knowledge for the UDDashboard Plugin and how to add additionall scripts so that they can be used within my PS script to manipulate existing charts is not good as I currrently do not completely understand how the charts are build by the Plugin.
Therefore would it be possible to provide a kind of how to?
e.g. starting from:
What codesnippets need to added to a js file to fulfill my need?
Where does this snippet need to be saved within the Plugin folder?
How can this script be made available correctly to the Plugin?
How does this snippet to be used then within the Plugin to manipulate my existing doughnut charts.
If you could help me out with this this would be highly appreciated!
Hi @Numelle I think I am going to have to ask @adam how to add additional .JS files to your dashboard, as sadly I do not have a scooby-doo at the moment, my HTML skills are not good. It’s like I might be able to fix the grid not exporting in IE if I figure adding additional JS capabilities…Opens up so many possibilities
Hi @psDevUK , if you could ask @adam this would be gr8.
Possibly we could also post this into a feature request?
Looking forward to hearing from you
cya
Numelle
Hi Adam, sorry for my late reply. Thanks for building this. Basically this is exactly what we are looking for. We would have the possibility to add a custom text to the innercircle or at least the overall count for a chart for example:
This is the overall count and within the legend the number of each color is mentioned.
Therefore from my perspective additionally the width of the doughnut itself should be editable as well.
That would be aussum!
Thanks for having a look at this!
Hey @Numelle no worries…I had it in the back of my head that someone else was after a similar control, then I found this post again so thought I should update it. I found this package here:-
And there is no mention of text other than the progress text, which you can show or hide, or the percentage symbol you can show or hide.
Hey @Numelle I actually put this in a “complaints” dashboard I designed for my company. I built a back-end SQL database, and this is from my login, showing I have raised 8 complaints, which I stored in a SESSION variable, then used another SESSION variable to calculate the total complaints…then get my complaints divide by total complaints multiplied by 100 gives you a percentage:-
So to try an encourage people to use the system more they can now see their contribution. Please note it is mainly female staff using the system, hence the “hot pink” text and progress
Hey @hammena I use UD Community to build these additional add-ons to UD on my personal laptop. This works in the comminuty version of UD and the enterprise version of UD. It is not included in UD by default as I built this as a custom component. To try and contribute to the comminuty
So yes you will need to download the module, then install this as well as your regular UD module then you get a new function to use:-