Open the Inspect panel at a chart's query
Right-click a chart point and pick Inspect to open the panel on that point's query.
It shows on charts that open the menu with query.menu().

The panel opens on its Data tab with the query in view: its rows, and the AQL and SQL behind them.

For a button or badge of your own, call query.inspect() from its click; control.inspect() opens a control on the Queries tab. Both need a reader's click. Learn more (opens in a new tab)