Avoid error when no record in chart
Add swap to charts