optimize chart rendering by caching parsed data