# I need to know how connect Wix Database with Chart?

**URL:** <https://forum.wixstudio.com/t/i-need-to-know-how-connect-wix-database-with-chart/29935>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [October 27, 2020, 5:59pm UTC](https://forum.wixstudio.com/t/i-need-to-know-how-connect-wix-database-with-chart/29935 "2020-10-27T17:59:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rasikahettige2015](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/rasikahettige2015/32/24398_2.png) [@rasikahettige2015](https://forum.wixstudio.com/u/rasikahettige2015)\
**Post date:** [October 27, 2020, 5:59pm UTC](https://forum.wixstudio.com/t/i-need-to-know-how-connect-wix-database-with-chart/29935/1 "2020-10-27T17:59:02Z")

</div>

Dear All,  
Please help me to connect my Wix database with a Chart. Chart in HTML Code. How can I obtain data from the database to my chart?  
Please help me…

---

<div class="post-metadata">

**Author:** ![J.D](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/j.d/32/7312_2.png) [@J.D](https://forum.wixstudio.com/u/J.D)\
**Post date:** [October 27, 2020, 6:52pm UTC](https://forum.wixstudio.com/t/i-need-to-know-how-connect-wix-database-with-chart/29935/2 "2020-10-27T18:52:24Z")

</div>

Save the data as an array in the database, query it when needed, and post it to your htmlCompnenet/custom element that contains the code for the chart.

---

<div class="post-metadata">

**Author:** ![rasikahettige2015](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/rasikahettige2015/32/24398_2.png) [@rasikahettige2015](https://forum.wixstudio.com/u/rasikahettige2015)\
**Post date:** [October 29, 2020, 11:32am UTC](https://forum.wixstudio.com/t/i-need-to-know-how-connect-wix-database-with-chart/29935/3 "2020-10-29T11:32:28Z")

</div>

Please explain more

---

<div class="post-metadata">

**Author:** ![J.D](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/j.d/32/7312_2.png) [@J.D](https://forum.wixstudio.com/u/J.D)\
**Post date:** [October 29, 2020, 12:56pm UTC](https://forum.wixstudio.com/t/i-need-to-know-how-connect-wix-database-with-chart/29935/4 "2020-10-29T12:56:53Z")

</div>

@rasikahettige2015  
See:  
[How to query your database](https://www.wix.com/corvid/reference/wix-data/query)

[How to post message to an htmlComponenet](https://www.wix.com/corvid/reference/$w/htmlcomponent/postmessage)

[Example of using Chart.JS](https://www.wix.com/corvid/example/create-a-custom-chart)
