How to build a chart from a table?

Good afternoon!

Very grateful for any help!

How to write a script (php or javascript) that will work as a chart designer, where the input values ​​are the values ​​from the table, which are obtained from the database on the page?

  • The input to the chart is data from MS SQL tables. (Displayed on the html page. The script does not query the database, it just accepts the passed array.)
  • The input to the script will be displayed next to this check box.
  • A Selection is made by marking different values ​​(check box).
  • Data for the X and Y axis and rows (values) - are read from the column names of the input table (which can be arbitrary. Rows can also be any).

How to pass an array (the table itself) in a script table to a chart? (POST and GET arrays or serialized?)

How to create an array of column names that were read and written in table X, Y and series?

How to use an array to draw a chart? (I plan to work with Phart).

+4
source share
3 answers

We use HighCharts . This is a jQuery based charting application. Very powerful and works from html tables that you already displayed.

+1
source

There is also Raphael.js , which I have not used, but looks REALLY good. With him the graphic library gRaphael

+2
source

You can see graphviz . This is a graph generator.

+1
source

All Articles