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
Examplecode is shown below:
indent preformatted text by 4 spaces
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!
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 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 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:-
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:-