Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. // x: where label could be put
  2. // y: where label could be put
  3. // value: value to show
  4. // total: total number to count %
  5. chart.each = function (f) {
  6.  
  7. var that = this;
  8.  
  9. for (var i = 0; i < len; i++)
  10. {
  11. (function (sector, cover, j)
  12. {
  13. var o =
  14. {
  15. sector: sector,
  16. cover: cover,
  17. cx: cx,
  18. cy: cy,
  19. x: sector.middle.x,
  20. y: sector.middle.y,
  21. mangle: sector.mangle,
  22. r: r,
  23. value: values[j],
  24. total: total,
  25. label: that.labels && that.labels[j]
  26. };
  27.  
  28. f.call(o);
  29.  
  30. })(series[i], covers[i], i);
  31. }
  32.  
  33. return this;
  34. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement