Adding a graphic pie from a table or dataset

Hello,
How can I add a simple pie from table in a dynamic page ?

Thanks for your help
Regards
Pierre-yves

Such as in Excel:

I think you should start by looking at this example: https://www.wix.com/code/home/example/Chart.

Hello,

My data is variable and stored in a dataset.
How can my pie or chart be dynamic and connected to a dataset ?

Thanks for your help.
regards,
pierre-yves

Hello Pierre,

You will have to first get the data from your data set and send it to the iframe.
In the example the flights object is hard coded. To adjust it to your needs - grab the info from the collection using a query, construct an object and then send it to the iframe.
Make sure to also modify the iframe code to correctly receive and display the information in a pie chart.
You can find examples in Chart.js’s website below
http://www.chartjs.org/samples/latest

Hi Ido, thanks for your explanation. Could you please provide a demo or sample on how to grab the info from the collection using a query? I am relatively new to coding

(Such a simple pie chart can also be drawn using svg as well which is supported by Corvid).

If there is anyone who did the experiment
For graphical work and directly linked to the database
Be thankful to him for presenting the way to us
I did research and experiment as well but didn’t work with me
I hope the support team will develop a detailed explanation or example of the process of linking the graph directly with the database

Go to this example: https://www.wix.com/corvid/example/create-a-custom-chart
Click the html component and change the “type” to “pie”.

I am not sure if this thread is still open. I used this example to create a graph, but how to I connect it to a database so that it updates when users input new information?