help with Chart.js
hi
can you please tell me how to create chart with MySQLi Server Behavior & Chart.js?
hi
can you please tell me how to create chart with MySQLi Server Behavior & Chart.js?
Do you have a link to the documentation for chart.js? The answer is to follow that documentation and then replace the data in their example with references to a MySQLi recordset.
I downloaded a template there is already a static chart I want to create order chart by date
Just replace the static code with code from your Recordset.
I know about this but what would be structure of the code? I meant what would be query? should I create any arrays etc?
It really depends on the code you are using, what you are charting, how your database is structured. This is something I could help with in a premier support ticket.
I want to charting purchased orders would be ordered by date
We would need to work on this in a premier support ticket. I'm not familiar with your chart program, so I can't say what you would need.
I want to make a sales chart like the one on the backend of an e-commerce website
I understand, but I don't know how your chart.js code works. You want monthly sales? A query for that might look like:
SELECT CONCAT( LEFT(MONTHNAME(OrderDate), 3), ' ', YEAR(OrderDate)) AS XLABEL, SUM(OrderAmount) AS YVALUE, MONTH(OrderDate) AS TheMonth, YEAR(OrderDate) AS TheYear FROM ps4_orders GROUP BY CONCAT( LEFT(MONTHNAME(OrderDate), 3), ' ', YEAR(OrderDate)), YEAR(OrderDate), MONTH(OrderDate) ORDER BY YEAR(OrderDate), MONTH(OrderDate) ASC
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.