getPanelData() returns {metadata, data}, not a plain array. Fixed to use pdata.data instead of pdata directly.