How to construct a chart from a table?

自闭症网瘾萝莉.ら 提交于 2019-12-30 10:03:04

问题


Good day!

Very grateful for any help!

How to write a script (php or javascript) which will work as a constructor of charts, where input values ​​are the values ​​from the table, which is derived from the database to the page?

  1. The input data in the chart will be data from MS SQL tables. (Displayed on the html page. The script does not query the database, it just takes the passed array.)
  2. The input data in the script to be displayed next to the checkbox.
  3. A Select is made by marking different values ​​(Checkbox).
  4. Data for the X and Y axis and series (values) - read from the input table column names (which can be arbitrary. Strings can also be any).

How to transfer array (the table itself) in the script for chart? (POST and GET arrays or serialized?)

How to make an array of column names were read and recorded in Table X, Y, and the series?

How do I use the array to draw the chart? (I plan to work with Phart).


回答1:


We use HighCharts. It's a jQuery based charting application. Very powerful and works from the html tables you already have displayed.




回答2:


There is also Raphael.js which I haven't used but looks REALLY good. With it's charting library gRaphael




回答3:


You may want to take a look at graphviz. This is a graph generator.



来源:https://stackoverflow.com/questions/7258847/how-to-construct-a-chart-from-a-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!