update source code for switch pie/bubble chart