Hi Junjie,
 You can calculate with in a loop so that each time you have no need to put a long calculation in dataPoints. Here is a example can help you http://jsfiddle.net/anjalij/QDkdH/2/
Please let me know if either it is works for you or if you face any problem.
	- 
		This reply was modified 11 years, 4 months ago by  Anjali. Anjali.