basic reusable chart working