EBA
January 2, 2024, 1:01pm
1
Hello!
I am new in this area. Do you know how to do an Apex Chart, with type “pie chart” or “donut chart” in the dashboard, related with some properties device?:
I am trying to make a pie chart with apexCharts. Example: Basic Pie Chart Example in React.js – ApexCharts.js
In my case, I have tried to show one property of one device which has just two items:
So then, in the widget of the dashboard of Thinger.io I have choosen the option “Apex Charts” with the template “Pie chart”:
So in the apex charts, I want to show just the two items of the device:
But it does not work. The result idoes not show the 100% (neither the right colours that I have choosen in the widget):
I have tried to put a max angle with “pie”: pie – ApexCharts.js
But it does not work yet:
Do you know how to do a pie chart (or donut chart) with Apex Chart in Thinger.io ? I do not know what is my problem
Thank you so much!
ega
January 8, 2024, 3:27am
2
Hi,
I just added two datasources and could build a graph
Without modifying the display options
I could not reproduce your issue.
EBA
January 8, 2024, 3:07pm
3
Thank you for your answer @ega !
Step by step, for testing it, I have done:
In a virtual device I have created the property “donutChartTest”, with the next JSON:
{
“Bombas riego”: “20”,
“Clima”: “60”,
“Iluminacion”: “20”
}
I have created a new dashbard and a new widget:
Into the widget I have put “type” Apex Charts:
In the apex charts I have put the datasources (of the previous JSON):
And in “Display options” I have choosen the “donut” template:
But it does not work. The result is the next:
Is it right? Or is there any problem?
Thank you in advance!
ega
January 8, 2024, 4:49pm
4
Hi,
Idk if the apex chart accept a string as input, remove the " " to the numeric values, let them just to the keys
"Bombas de riego" : 20,
...
Let us know how it goes.
1 Like
EBA
January 9, 2024, 8:08am
5
With that change it works!
Thank you so much @ega !
1 Like