move slice calculation to function (to allow access from "outside")
only allow editing on user created piecharts
Merge branch 'origin/piechart'