fixed: correctly check for empty chart data