Pie Chart With Charts.js 2.x pulling data from db
Hey, I have a table with a status field. I want to create a pie chart, counting each record of type 'status'. I don't really need help with the query, but I do need assistance understanding how to format the data so Chart.js will work. I don't need to use ajax, but if you have an example to share that is ajax based, that is fine. I haven't gotten very far with the Chartjs docs, and google examples all seem to be pretty basic or are based on 1.x version, and I keep running into a variety of errors. If someone has done this, seeing how you did so would be fantastic. I'm thinking there would be some server side logic parsing query results into a dataset that Chartjs can consume to create a pie chart, and some javascript showing how to create a chart and how to reference that data, and the html for the Canvas. Thanks in advance for anyone who wants to share.
Please or to participate in this conversation.