avoid keyError when exporting and chart data is not fully loaded