Create pie chart from php using mysql table

前端 未结 3 1568
别那么骄傲
别那么骄傲 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:

    0 讨论(0)
  • 2020-12-21 06:37

    Use either Google Chart, JpGraph, or GraPHPite

    0 讨论(0)
  • 2020-12-21 06:42

    Some more "charting" libraries what you can work with: Chart.Js AmCharts

    And I found an article, too about it.

    (Edit: Formating)

    0 讨论(0)
提交回复
热议问题