pie.js - labels, refactoring
(cherry picked from commit 84e860f)
refactoring