Create pie chart from php using mysql table

前端 未结 3 1571
别那么骄傲
别那么骄傲 2020-12-21 05:56

I have a mysql table like below

buy_trader    qty
--------------------
abc          48000
xyz          40000
pqr          35000
Others       88000

3条回答
  •  攒了一身酷
    2020-12-21 06:26

    You could generate an image of the chart from the command line using sqlchart http://www.sqldashboards.com/sqlchart#example-charts allows generating a pie chart straight from your mysql query like so: sqlchart --host dbserver --servertype mysql --user ryan --pass 123abc --chart piechart --execute "select * from tbl"

    In fact this is how it would look:

提交回复
热议问题