php 如何在php中从mysql数据库生成图形和图表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4352614/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to generate graphs and charts from mysql database in php
提问by Wern Ancheta
How can I generate graphs and charts from a mysql database using php?
如何使用php从mysql数据库生成图形和图表?
I'm trying to use "chart director" but I can't even install it properly, because I'm using php version 5.3, and it's using a deprecated function dl
.
我正在尝试使用“图表主管”,但我什至无法正确安装它,因为我使用的是 php 5.3 版,并且它使用的是已弃用的函数dl
。
Do you know of any alternatives that:
你知道任何替代方案:
- fully support php 5.3
- are easy to use for beginners
- can access the mysql database and chart its data
- 完全支持php 5.3
- 初学者易于使用
- 可以访问mysql数据库并绘制其数据
采纳答案by sushil bharwani
回答by Brett
I use highcharts. They are very interactive (and very fancy I might add). You do have to get a little creative to access data from MySQL database, but if you have a general understanding of JavaScript and PHP, you should have no problems.
我使用highcharts。它们非常具有互动性(我可能会补充说非常花哨)。从 MySQL 数据库访问数据确实需要一点创意,但是如果您对 JavaScript 和 PHP 有一个大致的了解,那么应该没有问题。
回答by Timothy Makobu
I use Google Chart Tools https://developers.google.com/chart/It's well documented and the charts look great. Being javascript, you can feed it json data via ajax.
我使用谷歌图表工具https://developers.google.com/chart/它有据可查,图表看起来很棒。作为 javascript,您可以通过 ajax 向它提供 json 数据。
回答by dsomnus
http://pchart.sourceforge.net/looks very good and it's free.
http://pchart.sourceforge.net/看起来很不错,而且是免费的。