Add write method to Chart