Visual Programmability: A Guide for Code-as-Thought in Chart Understanding