grafana / piechart-panel

Pie Chart Panel Plugin
MIT License
151 stars 101 forks source link

"no data points" when pie is hidden (due to size) and chart refreshes #177

Open jcachat opened 5 years ago

jcachat commented 5 years ago

I am using the latest grafana (6.1.3) & pie chart (1.3.6). I have a pie chart that some times has a large legend (depending on the source data). It is one of several panels on a dashboard.

If I change the dimensions of the browser window (or the client browser is a tablet sized device), the panels re-arrange and shrink. This sometimes results in the pie-chart itself being hidden and leaves ONLY the legend (which seems backwards to me but that is not the actual problem).

When that happens, "every other time" the dashboard auto refreshes, the pie chart panel shows a "no data points" error. By that I mean, the legend is displayed normally. Then it refreshes and I get an error. Then it refreshes and the chart displays normally. repeat...

The console shows the below error:

metrics_panel_ctrl.ts:178
Panel data error: Error: Invalid dimensions for plot, width = 0, height = -20
    at n.resize (jquery.flot.js:260)
    at new n (jquery.flot.js:238)
    at jquery.flot.js:1450
    at new a (jquery.flot.js:838)
    at Function.e.plot (default.ts:61)
    at addPieChart (rendering.js:138)
    at render (rendering.js:166)
    at s.eval (rendering.js:14)
    at s.emit (index.js:150)
    at e.emit (TagBadge.tsx:13)