added comments for private functionality, added color range default fallback in chart function