close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

help with Chart.js

Thread began 12/19/2019 4:36 am by Raza | Last modified 12/28/2019 12:13 pm by Ray Borduin | 1005 views | 13 replies |

Raza

help with Chart.js

hi
can you please tell me how to create chart with MySQLi Server Behavior & Chart.js?

Sign in to reply to this post

Ray BorduinWebAssist

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.

Sign in to reply to this post
Did this help? Tips are appreciated...

Raza

I downloaded a template there is already a static chart I want to create order chart by date

Sign in to reply to this post

Ray BorduinWebAssist

Just replace the static code with code from your Recordset.

Sign in to reply to this post
Did this help? Tips are appreciated...

Raza

I know about this but what would be structure of the code? I meant what would be query? should I create any arrays etc?

Sign in to reply to this post

Ray BorduinWebAssist

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.

Sign in to reply to this post
Did this help? Tips are appreciated...

Raza

I want to charting purchased orders would be ordered by date

Sign in to reply to this post

Ray BorduinWebAssist

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.

Sign in to reply to this post
Did this help? Tips are appreciated...

Raza

I want to make a sales chart like the one on the backend of an e-commerce website

Sign in to reply to this post

Ray BorduinWebAssist

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

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...