Pie Chart with MySQL datasource
See original GitHub issueHi,
I want to create simple Pie Chart with MySQL datasource.
I use two simple querys:
SELECT SUM(amount) as Monthly FROM tblhosting WHERE domainstatus = 'active' and billingcycle = 'Monthly';
SELECT SUM(amount)/12 as Annually FROM tblhosting WHERE domainstatus = 'active' and billingcycle = 'Annually';
When I try create Table with this querys it works fine.
But when try the same with “Pie Chart” I got error:
undefined is not an object (evaluating 'this.datapoints.length')
Query Inspector:
xhrStatus:“complete”
request:Object
method:“POST”
url:“api/tsdb/query”
data:Object
from:“1525941113670”
to:“1525962713671”
queries:Array[2]
response:Object
results:Object
A:Object
refId:“A”
meta:Object
rowCount:1
sql:“SELECT SUM(amount) as Monthly FROM tblhosting WHERE domainstatus = ‘active’ and billingcycle = ‘Monthly’;”
series:null
tables:Array[1]
B:Object
refId:“B”
meta:Object
rowCount:1
sql:“SELECT SUM(amount)/12 as Annually FROM tblhosting WHERE domainstatus = ‘active’ and billingcycle = ‘Annually’;”
series:null
tables:Array[1]
0:Object
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Pie Chart using data from MySQL table by PHP - Plus2net
Pie Chart using data from MySQL table by PHP ; config.php, MySQLi Database connection details are stored here. ; sql_dump.txt, SQL Dump to...
Read more >Pie Chart with data from MySQL database table using PHP ...
Part 1 of this tutorial we discussed about how to use google chart library to draw a pie chart with different options.
Read more >Pie Chart with MySQL datasource - Configuration
Hi, guys! I want to create simple Pie Chart with MySQL datasource. I use two simple querys: SELECT SUM(amount) as Monthly FROM tblhosting ......
Read more >How To Create A Pie Chart In PHP And MySQL - FusionCharts
When it comes to creating a PHP pie chart, you can obtain the data for the chart statically by defining the data during...
Read more >How to fill Pie chart with datas from MySql Datas
import numpy as np import matplotlib.pyplot as plt a = np.array([[44], [23], [25], [39], [34], [20], [44], [31], [32], [42]], ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@itayB will provide an example, but recommend you to have a look at Grafana’s community site which is more suitable for questions.
Using latest Grafana (5.3-pre1)
Generates the following without any other options specified:
The piechart panel only works with time series data which means that you’ll need to select a time_sec column in your query for the time - you should be able to use now() to return the same time for all your rows .