grafana / piechart-panel

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

getting "unexpected error happened" after using $__user.login variables in mysql query #252

Open manjunath4038 opened 3 years ago

manjunath4038 commented 3 years ago

Hi Team,

I wrote a following query in mysql and see that the pie chart panel is crashing. it worked well without "${user.login}". SELECT now() as time, count(*) cnt, base.Class metric FROM base LEFT JOIN owner ON base.serial_No = owner.serial_No where owner.current_owner_email = '${user.login}' AND base.Class in ($Category) group by base.Class order by cnt desc

I changed the visualization to " Bar Gauge" and didn't Screenshot (86)

see the issue.

Please help to resolve this issue. I have latest version of Grafana and Pie chart panel attaching the screen shot for the same.

mikebdp2 commented 3 years ago

@manjunath4038 I noticed it crashes when there are too many of pie slices (>~10). Temporary solution: don't display the pie slices smaller than a certain size, or unite them to "Others".

BGraco commented 3 years ago

I am running Grafana 7.2.2 with version 1.6.1 of the pie chart plugin and am having the exact same issue. My chart only has 4 slices, so I don't think the work around above helps for me.

Example result: image