What is best to use for php html5 charts?

html5
css3
jquery

#1

Hi, I want to make a bar chart or column chart to display on my webpage. I will be making a query to my MSSQL database. The page will have a refresh using js which is already done. With each refresh, my query will execute again, I want to add a column to the chart but keep the previous column too.
For example, let's say I am looking at files processed; the y-axis will have the number of files processed and the x-axis will show time.
Each time the page refreshes the chart gets another column added with the number of files processed.
What is the best library to use?
Is what I want to try and do even possible?
Do you have any advice on how to approach this problem?
Many thanks


#2

Highcharts offer a limited free and comprehensive library.

If you have the time try learning about SVG Charts. They are dynamically rendered within the web page and CSS can make the chart colorful. Either or both JavaScript can add animation.


#3

Do you mean you're pulling in data via Ajax from your backend?

Maybe its just the wording, but that doesn't sound right.


#4

Hi, on page load I query my database to get the variables for the chart, the page has a auto refresh using js with an interval set to however I want to poll. because I want to monitor how many files are being processed in the database that another program is uploading I am checking every 15 minutes. The chart will provide a visual aid, because I know on average how may files are being processed I can tell if it's too many or too little.
I don't know if it's the correct way to do it but it is the only way I know.


#6

So you have some data to render when the page loads, right?

Grab that, then use any of the hundreds of chart libraries out there to render your graph. Chart.js is a good one.

Then, instead of fully refreshing the page (which it sounds like you're doing), just make an Ajax request to the server, get the updated data, then re-render the chart to reflect that data.


#7

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.