You must be logged in to post your query.
Home › Forums › Chart Support › Plot data on pie chart using database
Tagged: canvasjs, php, pie chart, yii2
I am using canvasjs I want to plot data from database into the pie chart. I am able to get data from DB and pass it to an array.
canvasjs
database
DB
array_push($dataPointskWh, array("label"=>$pr['name'],"y"=>$cr['sum_kwh_diff']));
How can I plot them? Also, the data would increase so I want to plot in that way.
@fasi,
Please take a look at this Gallery Page for an example on rendering chart with data from database. You can also download sample from our download page which you can run locally.
If you still facing issue, kindly create sample project reproducing the issue you are facing and share with with us over Google-Drive or Onedrive so that we can run it locally to understand the scenario better and help you resolve.
— Vishwas R Team CanvasJS
You must be logged in to reply to this topic. Login/Register