You really should provide more information if you want useful help. The answer depends on your data model, whether this should take place in the reload or front end, the type of chart object etc. The quality of help is proportional to the quality of the information supplied.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question. I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.